Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / AcessNative / ld-acess_src / request.c
index fdf5748..690c7f7 100644 (file)
@@ -25,6 +25,7 @@
 # include <unistd.h>
 # include <sys/socket.h>
 # include <netinet/in.h>
+# include <sys/select.h>
 #endif
 #include "request.h"
 #include "../syscalls.h"
@@ -228,12 +229,12 @@ int SendRequest(tRequestHeader *Request, int RequestSize, int ResponseSize)
        // Send it off
        SendData(Request, RequestSize);
 
-       if( Request->CallID == SYS_EXIT )       return 0;
-
        // Wait for a response (no timeout)
        ReadData(Request, sizeof(*Request), 0);
+       
+       size_t  recvbytes = sizeof(*Request);
        // TODO: Sanity
-       size_t  recvbytes = sizeof(*Request), expbytes = Request->MessageLength;
+       size_t  expbytes = Request->MessageLength;
        char    *ptr = (void*)Request->Params;
        while( recvbytes < expbytes )
        {

UCC git Repository :: git.ucc.asn.au