Changeset 5634:7ad2a55f0205 in roaraudio for libroar


Ignore:
Timestamp:
08/24/12 13:52:47 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Updated CMD VIO to no longer eat more than needed. Helps resolving a endless loop in rpld.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_cmd.c

    r5619 r5634  
    308308 int     nonblock = state->options & ROAR_VIO_CMD_OPTS_NONBLOCK; 
    309309 int     in, out; 
    310  int     eating = 1; 
    311310 
    312311 ROAR_DBG("roar_vio_cmd_read(*) = ?"); 
     
    326325 out = state->reader.out; 
    327326 
    328  while (done < count || eating) { 
     327 while (done < count) { 
    329328  if ( nonblock ) { 
    330329   tv.tv_sec  =    0; 
     
    374373   if ( out != -1 && FD_ISSET(out, wfhs) ) { 
    375374    ROAR_DBG("roar_vio_cmd_read(*): event on writer"); 
    376     eating = 1; 
    377375 
    378376    if ( !tlen ) { 
     
    392390     state->reader.out = out = -1; 
    393391    } 
    394    } else { 
    395     eating = 0; 
    396392   } 
    397393  } 
Note: See TracChangeset for help on using the changeset viewer.