]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Abort module load if config can't be opened. Refs FS-4438
authorDaniel Swarbrick <daniel.swarbrick@gmail.com>
Fri, 20 Jul 2012 00:38:12 +0000 (02:38 +0200)
committerDaniel Swarbrick <daniel.swarbrick@gmail.com>
Fri, 20 Jul 2012 00:38:12 +0000 (02:38 +0200)
src/mod/event_handlers/mod_cdr_mongodb/conf/autoload_configs/cdr_mongodb.conf.xml
src/mod/event_handlers/mod_cdr_mongodb/mod_cdr_mongodb.c

index ce366d1bd04f887861cd3a30686c87770e10e00b..e1daf62adab6cf5eabb0af2a60a10299057ee5ae 100644 (file)
@@ -1,6 +1,6 @@
 <configuration name="cdr_mongodb.conf" description="MongoDB CDR logger">
   <settings>
-    <!-- Hostnames and IPv6 addrs not supported (yet) -->
+    <!-- IPv6 addresses not supported (yet) -->
     <param name="host" value="127.0.0.1"/>
     <param name="port" value="27017"/>
 
index 35ab4cba2f6ea69b70263428a3f4309f3f4d26c8..fec5b516efdc1abb0f9b8b91c698b4db3f97794d 100644 (file)
@@ -360,7 +360,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_mongodb_load)
        memset(&globals, 0, sizeof(globals));
        globals.pool = pool;
        if (load_config(pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Unable to load or parse config!\n");
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to load or parse config!\n");
+               return SWITCH_STATUS_FALSE;
        }
 
        db_status = mongo_connect(globals.mongo_conn, globals.mongo_host, globals.mongo_port);