Changeset 104:60026b54d652 in roaraudio


Ignore:
Timestamp:
07/13/08 02:31:54 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fixed long time existing read() of size zero while ROAR_CMD_ERROR bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/basic.c

    r61 r104  
    160160           mes->cmd == ROAR_CMD_OK ? "OK" : (mes->cmd == ROAR_CMD_ERROR ? "ERROR" : "UNKNOWN")); 
    161161 
     162 if ( mes->datalen == 0 ) { 
     163  ROAR_DBG("roar_recv_message(*): no data in this pkg"); 
     164  ROAR_DBG("roar_recv_message(*) = 0"); 
     165  return 0; 
     166 } 
     167 
    162168 if ( mes->datalen <= LIBROAR_BUFFER_MSGDATA ) { 
    163169  if ( read(con->fh, mes->data, mes->datalen) == mes->datalen ) { 
     
    174180   return -1; 
    175181 
    176   if ( mes->datalen == 0 ) { 
    177    ROAR_DBG("roar_recv_message(*): no data in this pkg"); 
    178    ROAR_DBG("roar_recv_message(*) = 0"); 
    179    return 0; 
    180   } 
    181  
    182182  if ( mes->datalen == 0 ) 
    183183   return 0; 
Note: See TracChangeset for help on using the changeset viewer.