Fixed nginx listen() bug
This commit is contained in:
@@ -740,8 +740,8 @@ int listen(LISTEN_SIG)
|
|||||||
memcpy(&cmd[1], &rpc_st, sizeof(struct listen_st));
|
memcpy(&cmd[1], &rpc_st, sizeof(struct listen_st));
|
||||||
pthread_mutex_lock(&lock);
|
pthread_mutex_lock(&lock);
|
||||||
send_command(fdret_sock, cmd);
|
send_command(fdret_sock, cmd);
|
||||||
err = get_retval();
|
//err = get_retval();
|
||||||
pthread_mutex_unlock(&lock);
|
pthread_mutex_unlock(&lock);
|
||||||
errno = ERR_OK;
|
//errno = ERR_OK;
|
||||||
return err;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -925,6 +925,7 @@ void NetconEthernetTap::handle_listen(PhySocket *sock, void **uptr, struct liste
|
|||||||
send_return_value(conn, ERR_OK, ERR_OK);
|
send_return_value(conn, ERR_OK, ERR_OK);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/*
|
||||||
fprintf(stderr, "handle_listen(): unable to allocate memory for new listening PCB\n");
|
fprintf(stderr, "handle_listen(): unable to allocate memory for new listening PCB\n");
|
||||||
// FIXME: This does not have an equivalent errno value
|
// FIXME: This does not have an equivalent errno value
|
||||||
// lwip will reclaim space with a tcp_listen call since a PCB in a LISTEN
|
// lwip will reclaim space with a tcp_listen call since a PCB in a LISTEN
|
||||||
@@ -933,12 +934,15 @@ void NetconEthernetTap::handle_listen(PhySocket *sock, void **uptr, struct liste
|
|||||||
// socket, even if the reason isn't describing what really happened internally.
|
// socket, even if the reason isn't describing what really happened internally.
|
||||||
// See: http://lwip.wikia.com/wiki/Raw/TCP
|
// See: http://lwip.wikia.com/wiki/Raw/TCP
|
||||||
send_return_value(conn, -1, EBADF);
|
send_return_value(conn, -1, EBADF);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/*
|
||||||
// We can't find a connection mapped to the socket fd provided
|
// We can't find a connection mapped to the socket fd provided
|
||||||
fprintf(stderr, "handle_listen(): can't locate connection for PCB\n");
|
fprintf(stderr, "handle_listen(): can't locate connection for PCB\n");
|
||||||
send_return_value(conn, -1, EBADF);
|
send_return_value(conn, -1, EBADF);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
netcon/libintercept.so.1.0
Executable file
BIN
netcon/libintercept.so.1.0
Executable file
Binary file not shown.
Reference in New Issue
Block a user