Changeset 3218:8748b21b361b in roaraudio for libroar/config.c
- Timestamp:
- 01/24/10 06:36:44 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/config.c
r3136 r3218 41 41 struct roar_libroar_config * roar_libroar_get_config_ptr(void) { 42 42 static struct roar_libroar_config config; 43 static int inited = 0; 43 static int inited = 0; 44 static char authfile[1024]; 45 char * home = getenv("HOME"); 44 46 45 47 if ( !inited ) { 46 48 memset(&config, 0, sizeof(config)); 47 49 48 config.server = NULL; 50 config.server = NULL; 51 config.authfile = NULL; 52 53 if ( home != NULL ) { 54 snprintf(authfile, 1023, "%s/.roarauth", home); 55 authfile[1023] = 0; 56 config.authfile = authfile; 57 } 49 58 50 59 inited++; … … 233 242 if ( roar_libroar_get_server() == NULL ) 234 243 roar_libroar_set_server(v); 244 } else if ( !strcmp(k, "set-authfile") ) { 245 strncpy(confi->authfile, v, 1023); 246 confi->authfile[1023] = 0; 235 247 } else { 236 248 ROAR_WARN("roar_libroar_config_parse(*): Unknown option: %s", k);
Note: See TracChangeset
for help on using the changeset viewer.