add_connection fixed to accept F instead of fd

This commit is contained in:
Valery Yatsko 2008-04-02 20:45:37 +04:00
parent 734bfb87bc
commit 9674dc79be
1 changed files with 5 additions and 5 deletions

View File

@ -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;