Changeset 4653:fb6662ea5f57 in roaraudio for libroar/basic.c


Ignore:
Timestamp:
12/09/10 19:43:50 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Support option to disable OpenSLP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/basic.c

    r4109 r4653  
    3737 
    3838int roar_connect_raw (char * server) { 
     39 struct roar_libroar_config * config = roar_libroar_get_config(); 
    3940 char user_sock[80]; 
    4041 char * roar_server; 
     
    136137 
    137138#ifdef ROAR_HAVE_LIBSLP 
    138  if ( (server = roar_slp_find_roard(0)) != NULL ) 
    139   if ( (fh = roar_connect_raw(server)) != -1 ) 
    140    return fh; 
    141  
    142  /* in case we can not connect to the server given this may be a cache problem, 
    143     we do a new lookup with the cache disabled in this case                     */ 
    144  ROAR_WARN("roar_connect_raw(*): Can not connect to SLP located server, disabling cache"); 
    145  if ( (server = roar_slp_find_roard(1)) != NULL ) 
    146   if ( (fh = roar_connect_raw(server)) != -1 ) 
    147    return fh; 
     139 if ( !(config->workaround.workarounds & ROAR_LIBROAR_CONFIG_WAS_NO_SLP) ) { 
     140  if ( (server = roar_slp_find_roard(0)) != NULL ) 
     141   if ( (fh = roar_connect_raw(server)) != -1 ) 
     142    return fh; 
     143 
     144  /* in case we can not connect to the server given this may be a cache problem, 
     145     we do a new lookup with the cache disabled in this case                     */ 
     146  ROAR_WARN("roar_connect_raw(*): Can not connect to SLP located server, disabling cache"); 
     147  if ( (server = roar_slp_find_roard(1)) != NULL ) 
     148   if ( (fh = roar_connect_raw(server)) != -1 ) 
     149    return fh; 
     150 } 
    148151#endif 
    149152 
Note: See TracChangeset for help on using the changeset viewer.