Show
Ignore:
Timestamp:
03/31/09 18:38:58 (15 years ago)
Author:
bhilburn
Message:

Memory leaks, style fixes, variable scoping.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/lib/socketcomm/socketcomm.cpp

    r222 r227  
    4141    // Messages are termination with a "\0" to denote EOM. 
    4242    ssize_t msgLength = recv(socketFD, msgBuffer, 256, MSG_PEEK); 
    43     if (msgLength < 0) 
     43    if(msgLength < 0) 
    4444        ERROR(1, "Error reading from socket.\n"); 
    45     if (msgLength == 0) 
     45    if(msgLength == 0) 
    4646        ERROR(1, "Remote component closed connection.\n"); 
    4747 
     
    5454    // Read the message into msgBuffer 
    5555    msgLength = recv(socketFD, msgBuffer, i + 1, 0); 
    56     if (msgLength < 0) 
     56    if(msgLength < 0) 
    5757        ERROR(1, "Error reading from socket.\n"); 
    58     if (msgLength == 0) 
     58    if(msgLength == 0) 
    5959        ERROR(1, "Remote component closed connection.\n"); 
    6060}