httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1304874 - /httpd/httpd/trunk/server/listen.c
Date Sat, 24 Mar 2012 18:01:07 GMT
Author: sf
Date: Sat Mar 24 18:01:07 2012
New Revision: 1304874

URL: http://svn.apache.org/viewvc?rev=1304874&view=rev
Log:
Remove the hack from r806010 that mis-uses the pointer to the per-directory
config for other things. This breaks with MPMs that do have a per-directory
config.

If any module appears that wants to use this functionality, we can
add a new, non-broken API. Since the docs clearly state that ap_set_listener()
should not be called by external modules, I don't consider this an API/ABI
change, but only a bug fix.

PR: 52904

Modified:
    httpd/httpd/trunk/server/listen.c

Modified: httpd/httpd/trunk/server/listen.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/listen.c?rev=1304874&r1=1304873&r2=1304874&view=diff
==============================================================================
--- httpd/httpd/trunk/server/listen.c (original)
+++ httpd/httpd/trunk/server/listen.c Sat Mar 24 18:01:07 2012
@@ -238,7 +238,7 @@ static apr_status_t close_listeners_on_e
 
 static const char *alloc_listener(process_rec *process, char *addr,
                                   apr_port_t port, const char* proto,
-                                  void *dummy)
+                                  void *slave)
 {
     ap_listen_rec **walk, *last;
     apr_status_t status;
@@ -273,7 +273,7 @@ static const char *alloc_listener(proces
     }
 
     if (found_listener) {
-        if (ap_listeners->slave != dummy) {
+        if (ap_listeners->slave != slave) {
             return "Cannot define a slave on the same IP:port as a Listener";
         }
         return NULL;
@@ -333,7 +333,7 @@ static const char *alloc_listener(proces
             last->next = new;
             last = new;
         }
-        new->slave = dummy;
+        new->slave = slave;
     }
 
     return NULL;
@@ -612,10 +612,6 @@ AP_DECLARE(void) ap_listen_pre_config(vo
     ap_listenbacklog = DEFAULT_LISTENBACKLOG;
 }
 
-/* Hack: populate an extra field
- * When this gets called from a Listen directive, dummy is null.
- * So we can use non-null dummy to pass a data pointer without conflict
- */
 AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
                                                 int argc, char *const argv[])
 {
@@ -662,7 +658,7 @@ AP_DECLARE_NONSTD(const char *) ap_set_l
         ap_str_tolower(proto);
     }
 
-    return alloc_listener(cmd->server->process, host, port, proto, dummy);
+    return alloc_listener(cmd->server->process, host, port, proto, NULL);
 }
 
 AP_DECLARE_NONSTD(const char *) ap_set_listenbacklog(cmd_parms *cmd,



Mime
View raw message