X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FClientSocket.c;h=ad634dc4408388a28fa301de24d5c7bb17e8c2ab;hp=6d2c34e5d20efe744237d1d6b3fab270a15c7607;hb=a0f5e337ee57df78939e9ddaccf9a18bcf811435;hpb=928457d6749cb1977e6d8bb6711995e1a287c551 diff --git a/src/ClientSocket.c b/src/ClientSocket.c index 6d2c34e..ad634dc 100644 --- a/src/ClientSocket.c +++ b/src/ClientSocket.c @@ -418,8 +418,8 @@ int clientsocket_parseorder_top(unsigned int tid) { } #endif -void socket_loop(int timeout_seconds) { - if(sockets == NULL) return; +int socket_loop(int timeout_seconds) { + if(sockets == NULL) return 0; int is_synchronized = 1; SYNCHRONIZE(synchronized_recv); fd_set fds; @@ -439,7 +439,7 @@ void socket_loop(int timeout_seconds) { ret = select(ret + 1, &fds, NULL, NULL, &timeout); if(ret == 0) { DESYNCHRONIZE(synchronized_recv); - return; + return 1; } for (sock = sockets->data; sock; sock = next) { next = sock->next; @@ -530,6 +530,7 @@ void socket_loop(int timeout_seconds) { if(is_synchronized) { DESYNCHRONIZE(synchronized_recv); } + return (ret + 1); } void