Changeset 5581:c00aa79358ad in roaraudio


Ignore:
Timestamp:
07/21/12 21:24:29 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

avoid false positive reply on client exec with non supported protocol or parameters

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroar/client.c

    r5381 r5581  
    168168  return -1; 
    169169 
     170 if ( m.cmd != ROAR_CMD_OK ) 
     171  return -1; 
     172 
    170173 client->fh = roar_get_connection_fh(con); 
    171174 
  • roard/req.c

    r5381 r5581  
    401401  return -1; 
    402402 
     403 if ( clients_get_protohandle(d[2]) == NULL ) 
     404  return -1; 
     405 
    403406 ROAR_DBG("req_on_exec_stream(client=%i,...) = ?", client); 
    404407 
     
    426429 
    427430 ROAR_DBG("req_on_exec_stream(client=%i,...): calling clients_new_from_fh(): sock=%i, d={?, ?, %i, %i}", client, sock, (int)d[2], (int)d[3]); 
    428  clients_new_from_fh(sock, d[2], d[3], 1); 
     431 if ( clients_new_from_fh(sock, d[2], d[3], 1) == -1 ) { 
     432  close(sock); 
     433 } 
    429434 
    430435 ROAR_DBG("req_on_exec_stream(client=%i,...) = 0", client); 
Note: See TracChangeset for help on using the changeset viewer.