Ignore:
Timestamp:
09/02/09 01:42:42 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

got esd emulation to allways read all the data needed in case it possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/roard/protocol-esound.c

    r2533 r2534  
    7070 struct emul_esd_command * cur; 
    7171 void * data = NULL; 
     72 ssize_t ret; 
     73 size_t  done = 0; 
    7274 int r; 
    7375 int i; 
     
    8991    } 
    9092 
    91     if ( roar_vio_read(vio, data, cur->datalen) != cur->datalen ) { 
    92      free(data); 
    93      clients_delete(client); 
    94      return -1; 
     93    while ( done < cur->datalen ) { 
     94     ret = roar_vio_read(vio, data+done, cur->datalen-done); 
     95 
     96     if ( ret < 1 ) { 
     97      free(data); 
     98      clients_delete(client); 
     99      return -1; 
     100     } else { 
     101      done += ret; 
     102     } 
    95103    } 
    96104   } 
Note: See TracChangeset for help on using the changeset viewer.