]> granicus.if.org Git - apache/commitdiff
Maybe this will get PORT working again....
authorVictor J. Orlikowski <orlikowski@apache.org>
Thu, 28 Jun 2001 18:34:59 +0000 (18:34 +0000)
committerVictor J. Orlikowski <orlikowski@apache.org>
Thu, 28 Jun 2001 18:34:59 +0000 (18:34 +0000)
break inside a switch statement inside a for loop
breaks out of the switch statement, not the for loop.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89476 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_ftp.c

index 4ff52939a2be84e449732546600a062c4d36d260..02bb14163552c22188ba30c1cc2c0fdc6d5287b5 100644 (file)
@@ -1530,13 +1530,14 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
         for(;;)
         {
 /* FIXME: this does not return, despite the incoming connection being accepted */
-            switch(rv = apr_accept(&remote_sock, local_sock, r->pool))
-            {
-            case APR_EINTR:
+            rv = apr_accept(&remote_sock, local_sock, r->pool);
+            if (rv == APR_EINTR) {
                 continue;
-            case APR_SUCCESS:
+            }
+            else if (rv == APR_SUCCESS) {
                 break;
-            default:
+            }
+            else {
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                               "proxy: FTP: failed to accept data connection");
                 return HTTP_BAD_GATEWAY;