add_connection fixed to accept F instead of fd
This commit is contained in:
parent
8e09c4a231
commit
99c4835f99
1 changed files with 5 additions and 5 deletions
|
@ -360,12 +360,12 @@ add_listener(int port, const char *vhost_ip, int family)
|
||||||
switch(family)
|
switch(family)
|
||||||
{
|
{
|
||||||
case AF_INET:
|
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);
|
((struct sockaddr_in *)&vaddr)->sin_port = htons(port);
|
||||||
break;
|
break;
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
case AF_INET6:
|
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);
|
((struct sockaddr_in6 *)&vaddr)->sin6_port = htons(port);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -441,8 +441,8 @@ close_listeners()
|
||||||
* The client is sent to the auth module for verification, and not put in
|
* The client is sent to the auth module for verification, and not put in
|
||||||
* any client list yet.
|
* any client list yet.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
add_connection(listener_t *listener, int fd, struct sockaddr *sai, int exempt)
|
add_connection(struct Listener *listener, rb_fde_t *F, struct sockaddr *sai, int exempt)
|
||||||
{
|
{
|
||||||
struct Client *new_client;
|
struct Client *new_client;
|
||||||
s_assert(NULL != listener);
|
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));
|
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;
|
new_client->localClient->listener = listener;
|
||||||
++listener->ref_count;
|
++listener->ref_count;
|
||||||
|
|
Loading…
Reference in a new issue