Changeset 2789:86670c04d940 in roaraudio


Ignore:
Timestamp:
09/26/09 12:29:18 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

additional debug lions, unknown protocols a bit more intelegent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/network.c

    r2545 r2789  
    129129 ROAR_DBG("net_get_new_client(*): proto=0x%.4x", proto); 
    130130 
    131  if ( clients_set_proto(client, proto) == -1 ) 
     131 if ( clients_set_proto(client, proto) == -1 ) { 
     132  ROAR_WARN("net_get_new_client(*): Setting proto(0x%.4x) of client %i failed.", proto, client); 
    132133  return -1; 
     134 } 
    133135 
    134136 switch (proto) { 
     137  case ROAR_PROTO_ROARAUDIO: 
     138    // nothing needed to be done here 
     139   break; 
    135140#ifndef ROAR_WITHOUT_DCOMP_EMUL_ESD 
    136141#ifdef ROAR_HAVE_ESD 
    137142  case ROAR_PROTO_ESOUND: 
    138     if ( roar_vio_open_fh(&vio, fh) == -1 ) 
     143    ROAR_DBG("net_get_new_client(*): execing ESD CONNECT command"); 
     144 
     145    if ( roar_vio_open_fh_socket(&vio, fh) == -1 ) 
    139146     return -1; 
     147 
     148    ROAR_DBG("net_get_new_client(*): creating VIO OK"); 
    140149 
    141150    if ( emul_esd_exec_command(client, ESD_PROTO_CONNECT, &vio) == -1 ) 
    142151     return -1; 
     152 
     153    ROAR_DBG("net_get_new_client(*): CONNECT execed sucessfully"); 
    143154   break; 
    144155#endif 
    145156#endif 
     157  default: 
     158    // OS independiend code to close the socket: 
     159    if ( roar_vio_open_fh_socket(&vio, fh) == -1 ) 
     160     return -1; 
     161    roar_vio_close(&vio); 
     162    return -1; 
     163   break; 
    146164 } 
    147165 
Note: See TracChangeset for help on using the changeset viewer.