On Fri, Sep 22, 2006 at 17:46:53 +0200, Julien Cristau wrote: > The call to ipp_read_http() at ipp.c:1054 is trying to read a header: > > if ((n = (*cb)(src, buffer, 8)) < 8) > { > DEBUG_printf(("ippReadIO: Unable to read header (%d bytes > read)!\n", n)); > return (n == 0 ? IPP_IDLE : IPP_ERROR); > } > > In this case, it returns IPP_IDLE, which is IMO wrong because a return > value of 0 means an EOF condition, not that "Nothing is happening". > The attached (trivial) patch would probably fix it. AFAIK there's no reason to consider 0 any different from any other return value. I don't have a printer and don't use gnome, though, so I won't test this.
Cheers, Julien
#! /bin/sh /usr/share/dpatch/dpatch-run ## 65_detect_http_shutdown.dpatch by Julien Cristau <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: If read()/recv() return 0, we are in an end-of-file condition ## DP: so we error out. @DPATCH@ diff -urNad cupsys-1.2.3~/cups/ipp.c cupsys-1.2.3/cups/ipp.c --- cupsys-1.2.3~/cups/ipp.c 2006-06-02 17:15:23.000000000 +0200 +++ cupsys-1.2.3/cups/ipp.c 2006-09-22 19:26:05.000000000 +0200 @@ -1054,7 +1054,7 @@ if ((n = (*cb)(src, buffer, 8)) < 8) { DEBUG_printf(("ippReadIO: Unable to read header (%d bytes read)!\n", n)); - return (n == 0 ? IPP_IDLE : IPP_ERROR); + return (IPP_ERROR); } /*
signature.asc
Description: Digital signature