From 9674dc79be8ec4f5456711ba7ae92e96c840604f Mon Sep 17 00:00:00 2001 From: Valery Yatsko Date: Wed, 2 Apr 2008 20:45:37 +0400 Subject: [PATCH] add_connection fixed to accept F instead of fd --- src/listener.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/listener.c b/src/listener.c index 8f577cc..d76bdfd 100644 --- a/src/listener.c +++ b/src/listener.c @@ -360,12 +360,12 @@ add_listener(int port, const char *vhost_ip, int family) switch(family) { case AF_INET: - SET_SS_LEN(vaddr, sizeof(struct sockaddr_in)); + SET_SS_LEN(&vaddr, sizeof(struct sockaddr_in)); ((struct sockaddr_in *)&vaddr)->sin_port = htons(port); break; #ifdef IPV6 case AF_INET6: - SET_SS_LEN(vaddr, sizeof(struct sockaddr_in6)); + SET_SS_LEN(&vaddr, sizeof(struct sockaddr_in6)); ((struct sockaddr_in6 *)&vaddr)->sin6_port = htons(port); break; #endif @@ -441,8 +441,8 @@ close_listeners() * The client is sent to the auth module for verification, and not put in * any client list yet. */ -static void -add_connection(listener_t *listener, int fd, struct sockaddr *sai, int exempt) +static void +add_connection(struct Listener *listener, rb_fde_t *F, struct sockaddr *sai, int exempt) { struct Client *new_client; s_assert(NULL != listener); @@ -465,7 +465,7 @@ add_connection(listener_t *listener, int fd, struct sockaddr *sai, int exempt) strlcpy(new_client->host, new_client->sockhost, sizeof(new_client->host)); - new_client->localClient->F = rb_add_fd(fd); + new_client->localClient->F = F; new_client->localClient->listener = listener; ++listener->ref_count;