Changeset 5201:4427d3c7382f in roaraudio


Ignore:
Timestamp:
10/23/11 14:50:38 (8 years ago)
Author:
phi
Branch:
default
Message:

fixed endless recursion in config loader

Location:
libroar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroar/config.c

    r5183 r5201  
    7575 
    7676 if ( !inited ) { 
     77  inited++; // we do this early so we can use ROAR_{DBG,INFO,WARN,ERR}() in roar_libroar_config_parse(). 
     78 
    7779  next = getenv("ROAR_OPTIONS"); 
    7880 
     
    8082   roar_libroar_config_parse(next, " "); 
    8183  } 
    82  
    83   inited++; 
    8484 } 
    8585 
  • libroar/debug.c

    r5111 r5201  
    170170#endif 
    171171 size_t  len; 
    172  int _ra_error  = roar_error; 
    173  int _sys_error = errno; 
     172 struct roar_error_state error_state; 
     173 
     174 roar_err_store(&error_state); 
    174175 
    175176 switch (type) { 
     
    203204  case ROAR_DEBUG_MODE_VIO: 
    204205    if ( (vio = roar_debug_get_stderr()) == NULL ) { 
    205       roar_error = _ra_error; 
    206       errno      = _sys_error; 
     206      roar_err_restore(&error_state); 
    207207     return; 
    208208    } 
     
    224224#endif 
    225225 } 
    226  roar_error = _ra_error; 
    227  errno      = _sys_error; 
     226 roar_err_restore(&error_state); 
    228227} 
    229228//ll 
Note: See TracChangeset for help on using the changeset viewer.