[Xfce4-commits] r22667 - xfprint/trunk/printing-systems/cups

Jean-François Wauthy pollux at xfce.org
Sat Aug 5 18:49:00 UTC 2006


Author: pollux
Date: 2006-08-05 18:49:00 +0000 (Sat, 05 Aug 2006)
New Revision: 22667

Modified:
   xfprint/trunk/printing-systems/cups/cups.c
Log:
let's be more explicit when request fails

Modified: xfprint/trunk/printing-systems/cups/cups.c
===================================================================
--- xfprint/trunk/printing-systems/cups/cups.c	2006-08-05 16:35:10 UTC (rev 22666)
+++ xfprint/trunk/printing-systems/cups/cups.c	2006-08-05 18:49:00 UTC (rev 22667)
@@ -170,6 +170,7 @@
   cupsSetPasswordCB (cups_password_cb);
 
   HTTP = httpConnectEncrypt (cupsServer (), ippPort (), cupsEncryption ());
+
   if (!HTTP) {
     ippDelete (request);
     g_warning ("Unable to connect CUPS server");
@@ -179,13 +180,14 @@
   request = cupsDoRequest (HTTP, request, path);
   httpClose (HTTP);
   status = cupsLastError ();
+
   if (!request) {
     g_warning ("CUPS server couldn't execute request");
     return NULL;
   }
 
   if (status > IPP_OK_CONFLICT)
-    g_warning ("failed request with status %d", status);
+    g_warning ("failed request with error: %s", ippErrorString (status));
 
   return request;
 }



More information about the Xfce4-commits mailing list