Changeset 4653:fb6662ea5f57 in roaraudio


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

Support option to disable OpenSLP

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4649 r4653  
    1717        * Fixed a FTBFS error with clang (Closes: #86) 
    1818        * Corrected some typos in manpages (pr1) 
     19        * Support option to disable OpenSLP (pr1) 
    1920 
    2021v. 0.4beta1 - Mon Nov 01 2010 16:14 CET 
  • include/libroar/config.h

    r4348 r4653  
    4242#define ROAR_LIBROAR_CONFIG_WAS_NONE        0x00 
    4343#define ROAR_LIBROAR_CONFIG_WAS_USE_EXECED  0x01 
     44#define ROAR_LIBROAR_CONFIG_WAS_NO_SLP      0x02 
    4445 
    4546#define ROAR_LIBROAR_CONFIG_PSET_Q          0x0001 
  • 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 
  • libroar/config.c

    r4517 r4653  
    220220   if ( !strcmp(v, "use-execed") ) { 
    221221    config->workaround.workarounds |= ROAR_LIBROAR_CONFIG_WAS_USE_EXECED; 
     222   } else if ( !strcmp(v, "no-slp") ) { 
     223    config->workaround.workarounds |= ROAR_LIBROAR_CONFIG_WAS_NO_SLP; 
    222224   } else { 
    223225    ROAR_WARN("roar_libroar_config_parse(*): Unknown workaround option: %s", v); 
Note: See TracChangeset for help on using the changeset viewer.