After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 171533 - Enum confusion in request_thread_main
Enum confusion in request_thread_main
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: general
CVS
Other All
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-03-24 22:49 UTC by Andreas J. Guelzow
Modified: 2005-03-28 15:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2005-03-24 22:49:19 UTC
request_thread_main in gnome-cups-request.c confuses ipp_status_t and
http_status_t. 

status is defined as the former but cupsGetFd returns the latter.

So HTTP_OK (200) looks like an error when interpreted as an ipp error code.
Comment 1 Morten Welinder 2005-03-25 03:26:34 UTC
Confirmed.

extern http_status_t	cupsGetFd(http_t *http, const char *resource, int fd);
http://www.opensource.apple.com/darwinsource/WWDC2004/cups-69/cups/cups.h

typedef enum			/**** IPP status codes... ****/
{
  IPP_OK = 0x0000,
  IPP_OK_SUBST,
  ...
} ipp_status_t;
http://www.opensource.apple.com/darwinsource/WWDC2004/cups-69/cups/ipp.h

typedef enum
{
  HTTP_ERROR = -1,		/* An error response from httpXxxx() */

  HTTP_CONTINUE = 100,		/* Everything OK, keep going... */
  HTTP_SWITCHING_PROTOCOLS,	/* HTTP upgrade to TLS/SSL */

  HTTP_OK = 200,		/* OPTIONS/GET/HEAD/POST/TRACE command was successful */
  ...
} http_status_t;
http://www.opensource.apple.com/darwinsource/WWDC2004/cups-69/cups/http.h

Comment 2 Jody Goldberg 2005-03-28 15:48:50 UTC
patched in cvs for 0.2.1