[Freeswitch-svn] [commit] r12869 - freeswitch/trunk/src/mod/applications/mod_skel

FreeSWITCH SVN mrene at freeswitch.org
Wed Apr 1 11:44:51 PDT 2009


Author: mrene
Date: Wed Apr  1 13:44:51 2009
New Revision: 12869

Log:
refactor

Modified:
   freeswitch/trunk/src/mod/applications/mod_skel/mod_skel.c

Modified: freeswitch/trunk/src/mod/applications/mod_skel/mod_skel.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_skel/mod_skel.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_skel/mod_skel.c	Wed Apr  1 13:44:51 2009
@@ -96,25 +96,12 @@
 
 static switch_status_t do_config(switch_bool_t reload)
 {
-	switch_xml_t cfg, xml, settings;
-
 	memset(&globals, 0, sizeof(globals));
 
-	if (!(xml = switch_xml_open_cfg("skel.conf", &cfg, NULL))) {
+	if (switch_xml_config_parse_module_settings("skel.conf", SWITCH_FALSE, instructions) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Could not open skel.conf\n");
 		return SWITCH_STATUS_FALSE;
 	}
-
-	if ((settings = switch_xml_child(cfg, "settings"))) {
-		if (switch_xml_config_parse(switch_xml_child(settings, "param"), 0, instructions) == SWITCH_STATUS_SUCCESS) {
-			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,"Config parsed ok!\n");
-			return SWITCH_STATUS_SUCCESS;
-		}
-	}
-	
-	if (xml) {
-		switch_xml_free(xml);
-	}
 	
 	return SWITCH_STATUS_SUCCESS;
 }



More information about the Freeswitch-svn mailing list