Kernel/debug - Panic to VT for the first nested panic
[tpg/acess2.git] / AcessNative / ld-acess_src / request.c
index 1560eb7..5bcf8cd 100644 (file)
@@ -293,7 +293,7 @@ int ReadData(void *Dest, int MaxLength, int Timeout)
        
        if( !ret ) {
                printf("[ERROR %i] Timeout reading from socket\n", giSyscall_ClientID);
-               return 0;       // Timeout
+               return -2;      // Timeout
        }
        
        #if USE_TCP
@@ -307,6 +307,11 @@ int ReadData(void *Dest, int MaxLength, int Timeout)
                perror("ReadData");
                exit(-1);
        }
+       if( ret == 0 ) {
+               fprintf(stderr, "[ERROR %i] Connection closed.\n", giSyscall_ClientID);
+               close(gSocket);
+               exit(0);
+       }
        
        DEBUG_S("%i bytes read from socket\n", ret);
        

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