A pointer to the server struct is passed anyways, the socket can be accessed via that pointer.
Signed-off-by: Tuomas Räsänen <[email protected]> --- nbd-server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nbd-server.c b/nbd-server.c index b2134c4..d7d9c62 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -2354,14 +2354,14 @@ handler_err: } static void -handle_oldstyle_connection(GArray *servers, int sock, SERVER *serve) +handle_oldstyle_connection(GArray *servers, SERVER *serve) { int net; CLIENT *client = NULL; int sock_flags_old; int sock_flags_new; - net = socket_accept(sock); + net = socket_accept(serve->socket); if (net < 0) return; @@ -2602,7 +2602,7 @@ void serveloop(GArray* servers) { continue; } if(FD_ISSET(serve->socket, &rset)) { - handle_oldstyle_connection(servers, serve->socket, serve); + handle_oldstyle_connection(servers, serve); } } } -- 1.7.10.4 ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
