Changeset 3825:0a66c056ac51 in roaraudio


Ignore:
Timestamp:
05/11/10 18:06:09 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

get INFO requets working at full speed

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/clients.c

    r3820 r3825  
    458458  case ROAR_PROTO_RSOUND: 
    459459    rv = emul_rsound_check_client(id, NULL); 
     460    if ( rv == 0 ) { // loop as long as we don't get an error. 
     461     while (rv == 0) 
     462      rv = emul_rsound_check_client(id, NULL); 
     463     rv = 0; // restore 
     464    } else { // in case of error delete the client 
     465     rv = clients_delete(id); 
     466    } 
    460467   break; 
    461468#endif 
  • roard/emul_rsound.c

    r3824 r3825  
    3939  char c[16]; 
    4040 } buf; 
     41 
     42 // TODO: add error handling 
     43 roar_socket_nonblock(fh, ROAR_SOCKET_NONBLOCK); 
    4144 
    4245 if ( emul_rsound_lastcon == -1 ) { 
     
    212215 } 
    213216 
     217 // we get called in a loop, in case this fails no problem, just 
     218 // return -1, caller will delete us in case of real error. 
    214219 if ( emul_rsound_vrecv_msg(&msg, vio) == -1 ) 
    215   return clients_delete(client); 
     220  return -1; 
    216221 
    217222 if ( !strncmp(msg.datasp, "INFO", 4) ) { 
     
    246251 } else if ( !strncmp(msg.datasp, "NULL", 4) ) { 
    247252  // NULL is simular to NOOP 
    248   return 0; 
    249253 } else if ( !strncmp(msg.datasp, "STOP", 4) ) { 
    250254  // This is quit. 
     
    253257  return clients_delete(client); 
    254258 } 
     259 
     260 return 0; 
    255261} 
    256262#endif 
Note: See TracChangeset for help on using the changeset viewer.