httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r581475 - /httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
Date Wed, 03 Oct 2007 02:09:13 GMT
Author: wrowe
Date: Tue Oct  2 19:09:13 2007
New Revision: 581475

URL: http://svn.apache.org/viewvc?rev=581475&view=rev
Log:
Had inverted the test for equality, man I hate strcmp

Modified:
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c?rev=581475&r1=581474&r2=581475&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Tue Oct  2 19:09:13 2007
@@ -1508,13 +1508,14 @@
     const char *addr;
     int family = 0;
 
-    if (strcmp(arg, "ALL")) {
+    if (strcmp(arg, "ALL") == 0) {
         /* A contract to never respond to other data connection methods */
         fc->all_epsv = 1;
+        fc->response_notes = apr_psprintf(r->pool, FTP_MSG_SUCCESS, r->method);
         return FTP_REPLY_COMMAND_OK;
     }
 
-    if (strcmp(arg, "1")) {
+    if (strcmp(arg, "1") == 0) {
         if (c->local_addr->family == AF_INET
 #if APR_HAVE_IPV6
             || (c->local_addr->family == AF_INET6 &&
@@ -1530,7 +1531,7 @@
             return FTP_REPLY_BAD_PROTOCOL;
         }
     }
-    else if (strcmp(arg, "2")) {
+    else if (strcmp(arg, "2") == 0) {
 #if APR_HAVE_IPV6
         family = AF_INET6;
         if (c->local_addr->family == AF_INET6 &&



Mime
View raw message