You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_ftp-commits@incubator.apache.org by wr...@apache.org on 2006/12/08 21:42:05 UTC

svn commit: r484796 - /incubator/mod_ftp/trunk/modules/ftp/ftp_protocol.c

Author: wrowe
Date: Fri Dec  8 13:42:04 2006
New Revision: 484796

URL: http://svn.apache.org/viewvc?view=rev&rev=484796
Log:
Fix very early ftp syntaxes - drop the pid recording (apr_log_cerror would be nice.)

Modified:
    incubator/mod_ftp/trunk/modules/ftp/ftp_protocol.c

Modified: incubator/mod_ftp/trunk/modules/ftp/ftp_protocol.c
URL: http://svn.apache.org/viewvc/incubator/mod_ftp/trunk/modules/ftp/ftp_protocol.c?view=diff&rev=484796&r1=484795&r2=484796
==============================================================================
--- incubator/mod_ftp/trunk/modules/ftp/ftp_protocol.c (original)
+++ incubator/mod_ftp/trunk/modules/ftp/ftp_protocol.c Fri Dec  8 13:42:04 2006
@@ -58,8 +58,7 @@
         pbuf = (char*)pb->base;
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frl: empty bb",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frl: empty bb");
 #endif
     }
     else {
@@ -78,8 +77,7 @@
         APR_BUCKET_REMOVE(pe);
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frl: using previous bb",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frl: using previous bb");
 #endif
     }
 
@@ -102,8 +100,7 @@
                 APR_BRIGADE_INSERT_HEAD(bb, pe);
 #ifdef FTP_TRACE
                 ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                             fc->connection->base_server, "FTP[%d] frl: got empty brigade",
-                             (int) getpid());
+                             fc->connection->base_server, "FTP frl: got empty brigade");
 #endif
                 return (block == APR_BLOCK_READ) ? APR_EGENERAL 
                                                  : APR_EAGAIN;
@@ -133,13 +130,12 @@
                     apr_socket_t *sock = e_next->data;
                     rv = apr_socket_atmark(sock, &mark);
                     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                      fc->connection->base_server, "FTP[%d] frl: atmark: %x %d",
-		      (int) getpid(), (int) rv, mark);
+                        fc->connection->base_server, "FTP frl: atmark: %x %d",
+		        (int) rv, mark);
                     if (rv == APR_SUCCESS && mark) {
                         pe->length = 0;
                         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                         fc->connection->base_server, "FTP[%d] frl: Saw OOB",
-			 (int) getpid());
+                            fc->connection->base_server, "FTP frl: Saw OOB");
                         continue;
                     }
                 }
@@ -243,8 +239,7 @@
                 apr_bucket_destroy(pe);
 #ifdef FTP_TRACE
                 ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                             fc->connection->base_server, "FTP[%d] frl: got full line",
-                             (int) getpid());
+                             fc->connection->base_server, "FTP frl: got full line");
 #endif
                 return APR_SUCCESS;
             }
@@ -253,8 +248,7 @@
     } while (pe->length <= 0);
 #ifdef FTP_TRACE
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                 fc->connection->base_server, "FTP[%d] frl: fall through success",
-                 (int) getpid());
+                 fc->connection->base_server, "FTP frl: fall through success");
 #endif
     return APR_SUCCESS;
 }
@@ -283,8 +277,7 @@
         fc->next_reqsize = 0;
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frrl: using read-ahead request",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frrl: using read-ahead request");
 #endif
     }
     else if ((rv = ftp_read_line(&r->the_request, &bytes_read,
@@ -298,8 +291,7 @@
     ll = r->the_request;
 #ifdef FTP_TRACE
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                 fc->connection->base_server, "FTP[%d] frrl: raw command: %s",
-		 (int) getpid(), ll);
+                 fc->connection->base_server, "FTP frrl: raw command: %s", ll);
 #endif
     r->method = ftp_toupper(r->pool, ap_getword_white(r->pool, &ll));
     r->method = ftp_get_cmd_alias(r->method);    
@@ -316,16 +308,14 @@
 
 #ifdef FTP_TRACE
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                 fc->connection->base_server, "FTP[%d] frar: entering",
-		 (int) getpid());
+                 fc->connection->base_server, "FTP frar: entering");
 #endif
 
     /* Review one command, only once */
     if (fc->next_request && *fc->next_request) {
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frar: previously read-ahead",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frar: previously read-ahead");
 #endif
         return APR_SUCCESS;
     }
@@ -336,8 +326,7 @@
                                          fc->connection->bucket_alloc);
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frar: created next_pool",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frar: created next_pool");
 #endif
     }
 
@@ -348,8 +337,7 @@
     if (APR_STATUS_IS_EAGAIN(rv)) {
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frar: not ready - read again",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frar: not ready - read again");
 #endif
         /* We actually like some failures here */
         return APR_SUCCESS;
@@ -366,8 +354,7 @@
 
 #ifdef FTP_TRACE
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                 fc->connection->base_server, "FTP[%d] frar: raw command: %s",
-		 (int) getpid(), ll);
+                 fc->connection->base_server, "FTP frar: raw command: %s", ll);
 #endif
 
     /*
@@ -379,11 +366,11 @@
      * how some clients do this, we also strip out
      * the IAC (xff) and IP (xf4) chars.
      */
-    if (method = strrchr(ll, '\xff'))
+    if ((method = ap_strrchr_c(ll, '\xff')))
         ll = ++method;
-    if (method = strrchr(ll, '\xf4'))
+    if ((method = ap_strrchr_c(ll, '\xf4')))
         ll = ++method;
-    if (method = strrchr(ll, '\xf2'))
+    if ((method = ap_strrchr_c(ll, '\xf2')))
         ll = ++method;
 
     /* XXX gross hack till we straighten out constness */
@@ -393,14 +380,12 @@
 
 #ifdef FTP_TRACE
     ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                 fc->connection->base_server, "FTP[%d] frar: method: %s",
-		 (int) getpid(), method);
+                 fc->connection->base_server, "FTP frar: method: %s", method);
 #endif
     /* Can we ignore this command for a while? */
     if (ftp_cmd_abort_data(method)) {
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frar: I see ABOR",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frar: I see ABOR");
         return APR_ECONNRESET;
     }
 
@@ -499,15 +484,13 @@
         tmp_bb = fc->next_bb;
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frr: using next_bb",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frr: using next_bb");
 #endif
     } else {
         tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frr: using tmp_bb",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frr: using tmp_bb");
 #endif
     }
     if ((rv = ftp_read_request_line(fc, r, tmp_bb)) != APR_SUCCESS)
@@ -581,8 +564,7 @@
         fc->next_pool = NULL;
 #ifdef FTP_TRACE
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, 
-                     fc->connection->base_server, "FTP[%d] frr: clearing next_pool",
-                     (int) getpid());
+                     fc->connection->base_server, "FTP frr: clearing next_pool");
 #endif
     }