]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Restore debug2 logging of cupsdAdd/RemoveSelect.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 30 May 2013 00:48:16 +0000 (00:48 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 30 May 2013 00:48:16 +0000 (00:48 +0000)
Add higher-level debug logging of client select management.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10999 a1ca3aef-8c08-0410-bb20-df032aa958be

scheduler/client.c
scheduler/select.c

index 55bff423696be7a77975456133ba8c7127617f8d..dd5eddef3197d33197463f3549ed8177697ff263 100644 (file)
@@ -471,6 +471,9 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
 
   cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient, NULL, con);
 
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Waiting for request.",
+                 con->http.fd);
+
  /*
   * Temporarily suspend accept()'s until we lose a client...
   */
@@ -594,6 +597,9 @@ cupsdCloseClient(cupsd_client_t *con)       /* I - Client to close */
 
       shutdown(con->http.fd, 0);
       cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient, NULL, con);
+
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Waiting for socket close.",
+                     con->http.fd);
     }
     else
     {
@@ -2431,6 +2437,9 @@ cupsdSendCommand(
 
   cupsdAddSelect(con->file, (cupsd_selfunc_t)write_pipe, NULL, con);
 
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Waiting for CGI data.",
+                 con->http.fd);
+
   con->sent_header = 0;
   con->file_ready  = 0;
   con->got_fields  = 0;
@@ -2859,6 +2868,9 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
 
     cupsdAddSelect(con->file, (cupsd_selfunc_t)write_pipe, NULL, con);
 
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Waiting for CGI data.",
+                   con->http.fd);
+
     if (!con->file_ready)
     {
      /*
@@ -3087,6 +3099,9 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
 
     cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient, NULL, con);
 
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Waiting for request.",
+                    con->http.fd);
+
     if (con->file >= 0)
     {
       cupsdRemoveSelect(con->file);
@@ -4335,6 +4350,8 @@ write_file(cupsd_client_t *con,           /* I - Client connection */
   cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient,
                  (cupsd_selfunc_t)cupsdWriteClient, con);
 
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] Sending file.", con->http.fd);
+
   return (1);
 }
 
@@ -4354,6 +4371,9 @@ write_pipe(cupsd_client_t *con)           /* I - Client connection */
 
   cupsdRemoveSelect(con->file);
   cupsdAddSelect(con->http.fd, NULL, (cupsd_selfunc_t)cupsdWriteClient, con);
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Client %d] CGI data ready to be sent.",
+                 con->http.fd);
 }
 
 
index a44ec2e3f9a44b835e47b0c0751a319e3aae49a5..44fa20b4c3b5815f52e79224769754c3924caaaf 100644 (file)
@@ -268,7 +268,7 @@ cupsdAddSelect(int             fd,  /* I - File descriptor */
   * Range check input...
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
                   "cupsdAddSelect(fd=%d, read_cb=%p, write_cb=%p, data=%p)",
                  fd, read_cb, write_cb, data);
 
@@ -723,7 +723,7 @@ cupsdRemoveSelect(int fd)           /* I - File descriptor */
   * Range check input...
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdRemoveSelect(fd=%d)", fd);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdRemoveSelect(fd=%d)", fd);
 
   if (fd < 0)
     return;