On Tue, 2003-03-25 at 11:18, Philippe M. Chiasson wrote: > On Sat, 2003-02-22 at 20:55, Jeff Trawick wrote: > > Philippe M. Chiasson wrote: > >
Realized my previous patch had lines > 78 chars, following patch fixes
that (thank you Stas)
# $Id: ap_alloc_listener.patch,v 1.3 2003/03/25 07:23:18 gozer Exp $
This patch has been submitted to the asf for inclusion.
Once applied, define AP_ALLOC_LISTENER in mod_udp_listen.h
Index: include/ap_listen.h
===================================================================
RCS file: /home/cvspublic/httpd-2.0/include/ap_listen.h,v
retrieving revision 1.31
diff -u -I'$Id' -I'$Revision' -r1.31 ap_listen.h
--- include/ap_listen.h 3 Feb 2003 17:52:53 -0000 1.31
+++ include/ap_listen.h 25 Mar 2003 07:18:05 -0000
@@ -149,4 +149,7 @@
AP_INIT_TAKE1("SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, \
"Send buffer size in bytes")
+AP_DECLARE(const char*) ap_alloc_listener(process_rec *process, char *addr,
+ apr_port_t port, int type);
+
#endif
Index: server/listen.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/listen.c,v
retrieving revision 1.85
diff -u -I'$Id' -I'$Revision' -r1.85 listen.c
--- server/listen.c 3 Feb 2003 17:53:18 -0000 1.85
+++ server/listen.c 25 Mar 2003 07:18:05 -0000
@@ -266,8 +266,8 @@
#endif
}
-
-static const char *alloc_listener(process_rec *process, char *addr, apr_port_t port)
+AP_DECLARE(const char *) ap_alloc_listener(process_rec *process, char *addr,
+ apr_port_t port, int type)
{
ap_listen_rec **walk;
ap_listen_rec *new;
@@ -323,7 +323,7 @@
}
if ((status = apr_socket_create(&new->sd,
new->bind_addr->family,
- SOCK_STREAM, process->pool))
+ type, process->pool))
!= APR_SUCCESS) {
ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
"alloc_listener: failed to get a socket for %s", addr);
@@ -429,7 +429,7 @@
return "Port must be specified";
}
- return alloc_listener(cmd->server->process, host, port);
+ return ap_alloc_listener(cmd->server->process, host, port, SOCK_STREAM);
}
const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg)
signature.asc
Description: This is a digitally signed message part
