diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 858411de795b06a6a0035cc2275f1ddc6535b146..10c9767a639e85d1744314400ebe3306ac60bc92 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -1392,6 +1392,9 @@ int load_module(void) store_config(cfg, ctg); } while ( (ctg = ast_category_browse(cfg, ctg)) != NULL); ast_config_destroy(cfg); + } else { + ast_log(LOG_NOTICE, "Unable to load config oss.conf\n"); + return -1; } if (find_desc(oss_active) == NULL) { ast_log(LOG_NOTICE, "Device %s not found\n", oss_active); diff --git a/logger.c b/logger.c index afdfa58d1ebb8434d38303c34996e07678e2ffcb..0ad5e3f9fe8ecb09e6fa7488332c32ecbbb6c7fa 100644 --- a/logger.c +++ b/logger.c @@ -314,9 +314,18 @@ static void init_logger_chain(void) cfg = ast_config_load("logger.conf"); - /* If no config file, we're fine */ - if (!cfg) + /* If no config file, we're fine, set default options. */ + if (!cfg) { + fprintf(stderr, "Unable to open logger.conf: %s\n", strerror(errno)); + chan = malloc(sizeof(struct logchannel)); + memset(chan, 0, sizeof(struct logchannel)); + chan->type = LOGTYPE_CONSOLE; + chan->logmask = 28; /*warning,notice,error */ + chan->next = logchannels; + logchannels = chan; + global_logmask |= chan->logmask; return; + } ast_mutex_lock(&loglock); if ((s = ast_variable_retrieve(cfg, "general", "appendhostname"))) {