Changeset 5846:21c98581c23b in roaraudio


Ignore:
Timestamp:
01/07/13 13:41:10 (7 years ago)
Author:
phi
Branch:
default
Message:

avoid possible problems with roar_env_get_home() outsite init phase. should also speed up roar_libroar_get_config_ptr() slightly

Location:
libroar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroar/basic.c

    r5845 r5846  
    140140 if ( _spawnlp(MODE, daemonimage, daemonimage, "--tcp", "--bind", "localhost", "--port", buf, (const char*)NULL) < 0 ) { 
    141141  roar_err_update(); 
     142  ret = roar_error; 
    142143  ROAR_ERR("_start_server_win32(server='%s', ...): Can not start server: %s: %s", server, daemonimage, roar_errorstring); 
     144  roar_error = ret; 
     145  ROAR_ERR("_start_server_win32(*): %s", roar_errorstring); 
     146  roar_error = ret; 
     147  ROAR_ERR("DUMMY"); 
     148  ROAR_ERR("_start_server_win32(*): %s", roar_errorstring); 
     149  roar_error = ret; 
     150  (void)roar_errorstring; 
     151  ROAR_ERR("_start_server_win32(*): %s", roar_errorstring); 
    143152  return -1; 
    144153 } 
     
    155164   roar_sleep(1); 
    156165 } 
     166 
     167 ROAR_ERR("_start_server_win32(*): %s", roar_errorstring); 
    157168 
    158169 if ( ret == -1 ) 
     
    236247static int _start_server(struct roar_connection * con, const char * server, int type, int flags, uint_least32_t timeout) { 
    237248#if defined(ROAR_TARGET_WIN32) 
    238  return _start_server_win32(con, server, type, flags, timeout); 
     249 int ret; 
     250 ret = _start_server_win32(con, server, type, flags, timeout); 
     251 ROAR_ERR("_start_server(*): %s", roar_errorstring); 
     252 return ret; 
    239253#elif !defined(ROAR_TARGET_MICROCONTROLLER) 
    240254 return _start_server_posix(con, server, type, flags, timeout); 
     
    293307  return 0; 
    294308 } else if ( !strcmp(server, "+fork") || !strncmp(server, "+fork=", 6) ) { 
    295   return _start_server(con, server, type, flags, timeout); 
     309  ret = _start_server(con, server, type, flags, timeout); 
     310  ROAR_ERR("_connect_server(*): %s", roar_errorstring); 
     311  return ret; 
    296312 } else if ( !strcmp(server, "+internal") || !strncmp(server, "+internal=", 10) ) { 
    297313  ret = _connect_internal(con, server, type, flags, timeout); 
  • libroar/config.c

    r5840 r5846  
    4646 static int    inited = 0; 
    4747 static char   authfile[LEN_AUTHFILE]; 
    48  const  char * home = roar_env_get_home(0); 
     48 const  char * home; 
    4949 
    5050 if ( !inited ) { 
     
    6262  config.protocolversion  = -1; // use default. 
    6363 
     64  home = roar_env_get_home(0); 
    6465  if ( home != NULL ) { 
    6566   snprintf(authfile, sizeof(authfile)-1, "%s/.roarauth", home); 
Note: See TracChangeset for help on using the changeset viewer.