[svn-commits] file: branch file/bridging r79825 - in /team/file/bridging: ./ apps/ cdr/ cha...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 16 20:23:41 CDT 2007


Author: file
Date: Thu Aug 16 20:23:40 2007
New Revision: 79825

URL: http://svn.digium.com/view/asterisk?view=rev&rev=79825
Log:
Merged revisions 79747,79749,79755,79764,79788,79794,79813,79824 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r79747 | tilghman | 2007-08-16 18:09:46 -0300 (Thu, 16 Aug 2007) | 2 lines

Don't reload a configuration file if nothing has changed.

................
r79749 | mmichelson | 2007-08-16 18:21:35 -0300 (Thu, 16 Aug 2007) | 16 lines

Merged revisions 79748 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79748 | mmichelson | 2007-08-16 16:16:40 -0500 (Thu, 16 Aug 2007) | 8 lines

Fixes a problem where agents would get stuck busy due to their wrapuptime being longer than the queue's wrapuptime and
ringinuse=no for the queue.

(closes issue #10215, reported by Doug, repaired by me)

Special thanks to fkasumovic for pointing out the source of the problem and to bweschke for helping to come up with a solution!


........

................
r79755 | file | 2007-08-16 18:28:50 -0300 (Thu, 16 Aug 2007) | 2 lines

Fix properties on trunk again.

................
r79764 | russell | 2007-08-16 18:33:38 -0300 (Thu, 16 Aug 2007) | 19 lines

Merged revisions 79756 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79756 | russell | 2007-08-16 16:29:24 -0500 (Thu, 16 Aug 2007) | 11 lines

Fix more deadlocks in chan_iax2 that were introduced by making frame handling
and scheduling multi-threaded.  Unfortunately, we have to do some expensive
deadlock avoidance when queueing frames on to the ast_channel owner of the IAX2
pvt struct.  This was already handled for regular frames, but ast_queue_hangup
and ast_queue_control were still used directly.  Making these changes introduced
even more places where the IAX2 pvt struct can disappear in the context of a
function holding its lock due to calling a function that has to unlock/lock it
to avoid deadlocks.  I went through and fixed all of these places to account for
this possibility.
(issue #10362, patch by me)

........

................
r79788 | russell | 2007-08-16 19:30:39 -0300 (Thu, 16 Aug 2007) | 22 lines

Merged revisions 79778 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79778 | russell | 2007-08-16 17:24:25 -0500 (Thu, 16 Aug 2007) | 14 lines

This patch fixes a bug where reloading the module with "module reload" did not
delete classes from memory that were no longer in the config.  This patch fixes
that problem as well as another one.  Previously, if you reloaded MOH using the
"moh reload" CLI command, which behaved differently than "module reload ...",
MOH had to be stopped on every channel and started again immediately.  However,
there was no way to tell what class was being used, so they would all fall back
to the default class.

(closes issue #10139)
Reported by: blitzrage
Patches: 
      asterisk-10139-advanced.diff.txt uploaded by jamesgolovich (license 176)
Tested by: jamesgolovich

........

................
r79794 | russell | 2007-08-16 19:33:02 -0300 (Thu, 16 Aug 2007) | 12 lines

Merged revisions 79792 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r79792 | russell | 2007-08-16 17:32:33 -0500 (Thu, 16 Aug 2007) | 4 lines

Fix a little race condition that could cause a crash if two channels had MOH
stopped at the same time that were using a class that had been marked for
deletion when its use count hits zero.

........

................
r79813 | tilghman | 2007-08-16 20:31:14 -0300 (Thu, 16 Aug 2007) | 2 lines

Revise dialplan locks to permit multiple locks per channel, but with deadlock avoidance

................
r79824 | file | 2007-08-16 22:19:04 -0300 (Thu, 16 Aug 2007) | 2 lines

Fix building of chan_zap under development mode without libpri and libss7 installed.

................

Modified:
    team/file/bridging/   (props changed)
    team/file/bridging/apps/app_alarmreceiver.c
    team/file/bridging/apps/app_amd.c
    team/file/bridging/apps/app_directory.c
    team/file/bridging/apps/app_festival.c
    team/file/bridging/apps/app_followme.c
    team/file/bridging/apps/app_meetme.c
    team/file/bridging/apps/app_minivm.c
    team/file/bridging/apps/app_osplookup.c
    team/file/bridging/apps/app_playback.c
    team/file/bridging/apps/app_privacy.c
    team/file/bridging/apps/app_queue.c
    team/file/bridging/apps/app_rpt.c
    team/file/bridging/apps/app_voicemail.c
    team/file/bridging/cdr/cdr_adaptive_odbc.c
    team/file/bridging/cdr/cdr_csv.c
    team/file/bridging/cdr/cdr_custom.c
    team/file/bridging/cdr/cdr_manager.c
    team/file/bridging/cdr/cdr_odbc.c
    team/file/bridging/cdr/cdr_pgsql.c
    team/file/bridging/cdr/cdr_radius.c
    team/file/bridging/cdr/cdr_sqlite3_custom.c
    team/file/bridging/cdr/cdr_tds.c
    team/file/bridging/channels/chan_agent.c
    team/file/bridging/channels/chan_alsa.c
    team/file/bridging/channels/chan_gtalk.c
    team/file/bridging/channels/chan_h323.c
    team/file/bridging/channels/chan_iax2.c
    team/file/bridging/channels/chan_jingle.c
    team/file/bridging/channels/chan_mgcp.c
    team/file/bridging/channels/chan_misdn.c
    team/file/bridging/channels/chan_oss.c
    team/file/bridging/channels/chan_phone.c
    team/file/bridging/channels/chan_sip.c
    team/file/bridging/channels/chan_skinny.c
    team/file/bridging/channels/chan_vpb.cc
    team/file/bridging/channels/chan_zap.c
    team/file/bridging/channels/iax2-provision.c
    team/file/bridging/channels/iax2-provision.h
    team/file/bridging/channels/misdn/chan_misdn_config.h
    team/file/bridging/channels/misdn_config.c
    team/file/bridging/codecs/codec_adpcm.c
    team/file/bridging/codecs/codec_alaw.c
    team/file/bridging/codecs/codec_g722.c
    team/file/bridging/codecs/codec_g726.c
    team/file/bridging/codecs/codec_gsm.c
    team/file/bridging/codecs/codec_lpc10.c
    team/file/bridging/codecs/codec_speex.c
    team/file/bridging/codecs/codec_ulaw.c
    team/file/bridging/codecs/codec_zap.c
    team/file/bridging/funcs/func_lock.c
    team/file/bridging/funcs/func_odbc.c
    team/file/bridging/include/asterisk/config.h
    team/file/bridging/main/asterisk.c
    team/file/bridging/main/cdr.c
    team/file/bridging/main/config.c
    team/file/bridging/main/dnsmgr.c
    team/file/bridging/main/enum.c
    team/file/bridging/main/http.c
    team/file/bridging/main/loader.c
    team/file/bridging/main/logger.c
    team/file/bridging/main/manager.c
    team/file/bridging/main/rtp.c
    team/file/bridging/main/udptl.c
    team/file/bridging/pbx/pbx_config.c
    team/file/bridging/pbx/pbx_dundi.c
    team/file/bridging/res/res_adsi.c
    team/file/bridging/res/res_config_odbc.c
    team/file/bridging/res/res_config_pgsql.c
    team/file/bridging/res/res_config_sqlite.c
    team/file/bridging/res/res_features.c
    team/file/bridging/res/res_indications.c
    team/file/bridging/res/res_jabber.c
    team/file/bridging/res/res_musiconhold.c
    team/file/bridging/res/res_odbc.c
    team/file/bridging/res/res_smdi.c
    team/file/bridging/res/res_snmp.c

Propchange: team/file/bridging/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/file/bridging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 16 20:23:40 2007
@@ -1,1 +1,1 @@
-/trunk:1-79736
+/trunk:1-79824

Modified: team/file/bridging/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_alarmreceiver.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_alarmreceiver.c (original)
+++ team/file/bridging/apps/app_alarmreceiver.c Thu Aug 16 20:23:40 2007
@@ -714,10 +714,11 @@
 {
 	struct ast_config *cfg;
 	const char *p;
+	struct ast_flags config_flags = { 0 };
 
 	/* Read in the config file */
 
-	cfg = ast_config_load(ALMRCV_CONFIG);
+	cfg = ast_config_load(ALMRCV_CONFIG, config_flags);
                                                                                                                                   
 	if(!cfg){
 	

Modified: team/file/bridging/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_amd.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_amd.c (original)
+++ team/file/bridging/apps/app_amd.c Thu Aug 16 20:23:40 2007
@@ -317,16 +317,18 @@
 	return 0;
 }
 
-static void load_config(void)
+static void load_config(int reload)
 {
 	struct ast_config *cfg = NULL;
 	char *cat = NULL;
 	struct ast_variable *var = NULL;
-
-	if (!(cfg = ast_config_load("amd.conf"))) {
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+
+	if (!(cfg = ast_config_load("amd.conf", config_flags))) {
 		ast_log(LOG_ERROR, "Configuration file amd.conf missing.\n");
 		return;
-	}
+	} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return;
 
 	cat = ast_category_browse(cfg, NULL);
 
@@ -377,13 +379,13 @@
 
 static int load_module(void)
 {
-	load_config();
+	load_config(0);
 	return ast_register_application(app, amd_exec, synopsis, descrip);
 }
 
 static int reload(void)
 {
-	load_config();
+	load_config(1);
 	return 0;
 }
 

Modified: team/file/bridging/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_directory.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_directory.c (original)
+++ team/file/bridging/apps/app_directory.c Thu Aug 16 20:23:40 2007
@@ -364,9 +364,10 @@
 	const char *fullname;
 	const char *hidefromdir;
 	char tmp[100];
+	struct ast_flags config_flags = { 0 };
 
 	/* Load flat file config. */
-	cfg = ast_config_load(VOICEMAIL_CONFIG);
+	cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags);
 
 	if (!cfg) {
 		/* Loading config failed. */
@@ -597,6 +598,7 @@
 	int fromappvm = 0;
 	const char *dirintro;
 	char *parse;
+	struct ast_flags config_flags = { 0 };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(vmcontext);
 		AST_APP_ARG(dialcontext);
@@ -630,7 +632,7 @@
 		return -1;
 	}
 	
-	ucfg = ast_config_load("users.conf");
+	ucfg = ast_config_load("users.conf", config_flags);
 
 	dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
 	if (ast_strlen_zero(dirintro))
@@ -674,7 +676,8 @@
 static int load_module(void)
 {
 #ifdef ODBC_STORAGE
-	struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG);
+	struct ast_flags config_flags = { 0 };
+	struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags);
 	const char *tmp;
 
 	if (cfg) {

Modified: team/file/bridging/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_festival.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_festival.c (original)
+++ team/file/bridging/apps/app_festival.c Thu Aug 16 20:23:40 2007
@@ -306,6 +306,7 @@
 	char *data;	
 	struct ast_config *cfg;
 	char *newfestivalcommand;
+	struct ast_flags config_flags = { 0 };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(text);
 		AST_APP_ARG(interrupt);
@@ -316,7 +317,7 @@
 		return -1;
 	}
 
-	cfg = ast_config_load(FESTIVAL_CONFIG);
+	cfg = ast_config_load(FESTIVAL_CONFIG, config_flags);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
 		return -1;
@@ -520,7 +521,8 @@
 
 static int load_module(void)
 {
-	struct ast_config *cfg = ast_config_load(FESTIVAL_CONFIG);
+	struct ast_flags config_flags = { 0 };
+	struct ast_config *cfg = ast_config_load(FESTIVAL_CONFIG, config_flags);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
 		return AST_MODULE_LOAD_DECLINE;

Modified: team/file/bridging/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_followme.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_followme.c (original)
+++ team/file/bridging/apps/app_followme.c Thu Aug 16 20:23:40 2007
@@ -275,7 +275,7 @@
 }
 
 /*! \brief Reload followme application module */
-static int reload_followme(void)
+static int reload_followme(int reload)
 {
 	struct call_followme *f;
 	struct ast_config *cfg;
@@ -289,11 +289,13 @@
 	const char *takecallstr;
 	const char *declinecallstr;
 	const char *tmpstr;
-
-	if (!(cfg = ast_config_load("followme.conf"))) {
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+
+	if (!(cfg = ast_config_load("followme.conf", config_flags))) {
 		ast_log(LOG_WARNING, "No follow me config file (followme.conf), so no follow me\n");
 		return 0;
-	}
+	} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
 
 	AST_RWLIST_WRLOCK(&followmes);
 
@@ -1051,7 +1053,7 @@
 
 static int load_module(void)
 {
-	if(!reload_followme())
+	if(!reload_followme(0))
 		return AST_MODULE_LOAD_DECLINE;
 
 	return ast_register_application(app, app_exec, synopsis, descrip);
@@ -1059,7 +1061,7 @@
 
 static int reload(void)
 {
-	reload_followme();
+	reload_followme(1);
 
 	return 0;	
 }

Modified: team/file/bridging/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_meetme.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_meetme.c (original)
+++ team/file/bridging/apps/app_meetme.c Thu Aug 16 20:23:40 2007
@@ -2407,6 +2407,7 @@
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
+	struct ast_flags config_flags = { 0 };
 	struct ast_conference *cnf;
 	char *parse;
 	AST_DECLARE_APP_ARGS(args,
@@ -2444,7 +2445,7 @@
 			}
 		} else {
 			/* Check the config */
-			cfg = ast_config_load(CONFIG_FILE_NAME);
+			cfg = ast_config_load(CONFIG_FILE_NAME, config_flags);
 			if (!cfg) {
 				ast_log(LOG_WARNING, "No %s file :(\n", CONFIG_FILE_NAME);
 				return NULL;
@@ -2551,7 +2552,7 @@
 	int allowretry = 0;
 	int retrycnt = 0;
 	struct ast_conference *cnf = NULL;
-	struct ast_flags confflags = {0};
+	struct ast_flags confflags = {0}, config_flags = { 0 };
 	int dynamic = 0;
 	int empty = 0, empty_no_pin = 0;
 	int always_prompt = 0;
@@ -2609,7 +2610,7 @@
 
 			/* We only need to load the config file for static and empty_no_pin (otherwise we don't care) */
 			if ((empty_no_pin) || (!dynamic)) {
-				cfg = ast_config_load(CONFIG_FILE_NAME);
+				cfg = ast_config_load(CONFIG_FILE_NAME, config_flags);
 				if (cfg) {
 					var = ast_variable_browse(cfg, "rooms");
 					while (var) {
@@ -3174,11 +3175,12 @@
 static void load_config_meetme(void)
 {
 	struct ast_config *cfg;
+	struct ast_flags config_flags = { 0 };
 	const char *val;
 
 	audio_buffers = DEFAULT_AUDIO_BUFFERS;
 
-	if (!(cfg = ast_config_load(CONFIG_FILE_NAME)))
+	if (!(cfg = ast_config_load(CONFIG_FILE_NAME, config_flags)))
 		return;
 
 	if ((val = ast_variable_retrieve(cfg, "general", "audiobuffers"))) {
@@ -4894,6 +4896,7 @@
 static int sla_load_config(int reload)
 {
 	struct ast_config *cfg;
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 	const char *cat = NULL;
 	int res = 0;
 	const char *val;
@@ -4903,8 +4906,10 @@
 		ast_cond_init(&sla.cond, NULL);
 	}
 
-	if (!(cfg = ast_config_load(SLA_CONFIG_FILE)))
+	if (!(cfg = ast_config_load(SLA_CONFIG_FILE, config_flags)))
 		return 0; /* Treat no config as normal */
+	else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
 
 	if ((val = ast_variable_retrieve(cfg, "general", "attemptcallerid")))
 		sla.attempt_callerid = ast_true(val);

Modified: team/file/bridging/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_minivm.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_minivm.c (original)
+++ team/file/bridging/apps/app_minivm.c Thu Aug 16 20:23:40 2007
@@ -2349,7 +2349,7 @@
 }
 
 /*! \brief Load minivoicemail configuration */
-static int load_config(void)
+static int load_config(int reload)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
@@ -2357,8 +2357,12 @@
 	const char *chanvar;
 	int error = 0;
 	struct minivm_template *template;
-
-	cfg = ast_config_load(VOICEMAIL_CONFIG);
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+
+	cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags);
+	if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
+
 	ast_mutex_lock(&minivmlock);
 
 	/* Destroy lists to reconfigure */
@@ -3039,7 +3043,7 @@
 	if (res)
 		return(res);
 
-	if ((res = load_config()))
+	if ((res = load_config(0)))
 		return(res);
 
 	ast_cli_register_multiple(cli_minivm, sizeof(cli_minivm)/sizeof(cli_minivm[0]));
@@ -3053,7 +3057,7 @@
 /*! \brief Reload mini voicemail module */
 static int reload(void)
 {
-	return(load_config());
+	return(load_config(1));
 }
 
 /*! \brief Reload cofiguration */

Modified: team/file/bridging/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_osplookup.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_osplookup.c (original)
+++ team/file/bridging/apps/app_osplookup.c Thu Aug 16 20:23:40 2007
@@ -1773,15 +1773,22 @@
 
 /* OSP Module APIs */
 
-static int osp_load(void)
+static int osp_unload(void);
+static int osp_load(int reload)
 {
 	const char* t;
 	unsigned int v;
 	struct ast_config* cfg;
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 	int error = OSPC_ERR_NO_ERROR;
 
-	cfg = ast_config_load(OSP_CONFIG_FILE);
+	if ((cfg = ast_config_load(OSP_CONFIG_FILE, config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
+
 	if (cfg) {
+		if (reload)
+			osp_unload();
+
 		t = ast_variable_retrieve(cfg, OSP_GENERAL_CAT, "accelerate");
 		if (t && ast_true(t)) {
 			if ((error = OSPPInit(1)) != OSPC_ERR_NO_ERROR) {
@@ -2000,7 +2007,7 @@
 {
 	int res;
 
-	if(!osp_load())
+	if (!osp_load(0))
 		return AST_MODULE_LOAD_DECLINE;
 
 	ast_cli_register_multiple(cli_osp, sizeof(cli_osp) / sizeof(struct ast_cli_entry));
@@ -2028,8 +2035,7 @@
 
 static int reload(void)
 {
-	osp_unload();
-	osp_load();
+	osp_load(1);
 
 	return 0;
 }

Modified: team/file/bridging/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_playback.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_playback.c (original)
+++ team/file/bridging/apps/app_playback.c Thu Aug 16 20:23:40 2007
@@ -470,12 +470,17 @@
 static int reload(void)
 {
 	struct ast_variable *v;
+	struct ast_flags config_flags = { CONFIG_FLAG_FILEUNCHANGED };
+	struct ast_config *newcfg;
+
+	if ((newcfg = ast_config_load("say.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
 
 	if (say_cfg) {
 		ast_config_destroy(say_cfg);
 		ast_log(LOG_NOTICE, "Reloading say.conf\n");
-	}
-	say_cfg = ast_config_load("say.conf");
+		say_cfg = newcfg;
+	}
 
 	if (say_cfg) {
 		for (v = ast_variable_browse(say_cfg, "general"); v ; v = v->next) {
@@ -510,8 +515,9 @@
 static int load_module(void)
 {
 	struct ast_variable *v;
-
-	say_cfg = ast_config_load("say.conf");
+	struct ast_flags config_flags = { 0 };
+
+	say_cfg = ast_config_load("say.conf", config_flags);
 	if (say_cfg) {
 		for (v = ast_variable_browse(say_cfg, "general"); v ; v = v->next) {
     			if (ast_extension_match(v->name, "mode")) {

Modified: team/file/bridging/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_privacy.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_privacy.c (original)
+++ team/file/bridging/apps/app_privacy.c Thu Aug 16 20:23:40 2007
@@ -83,6 +83,7 @@
 	char phone[30];
 	struct ast_config *cfg = NULL;
 	char *parse = NULL;
+	struct ast_flags config_flags = { 0 };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(maxretries);
 		AST_APP_ARG(minlength);
@@ -122,7 +123,7 @@
 		if (!x)
 		{
 			/*Read in the config file*/
-			cfg = ast_config_load(PRIV_CONFIG);
+			cfg = ast_config_load(PRIV_CONFIG, config_flags);
 		
 			if (cfg && (s = ast_variable_retrieve(cfg, "general", "maxretries"))) {
 				if (sscanf(s, "%d", &x) == 1) 

Modified: team/file/bridging/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_queue.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_queue.c (original)
+++ team/file/bridging/apps/app_queue.c Thu Aug 16 20:23:40 2007
@@ -3947,7 +3947,7 @@
 	.read = queue_function_queuememberlist,
 };
 
-static int reload_queues(void)
+static int reload_queues(int reload)
 {
 	struct call_queue *q;
 	struct ast_config *cfg;
@@ -3960,16 +3960,18 @@
 	char *interface;
 	char *membername;
 	int penalty;
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(interface);
 		AST_APP_ARG(penalty);
 		AST_APP_ARG(membername);
 	);
 	
-	if (!(cfg = ast_config_load("queues.conf"))) {
+	if (!(cfg = ast_config_load("queues.conf", config_flags))) {
 		ast_log(LOG_NOTICE, "No call queueing config file (queues.conf), so no call queues\n");
 		return 0;
-	}
+	} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
 	AST_LIST_LOCK(&queues);
 	use_weight=0;
 	/* Mark all queues as dead for the moment */
@@ -4766,7 +4768,7 @@
 	int res;
 	struct ast_context *con;
 
-	if (!reload_queues())
+	if (!reload_queues(0))
 		return AST_MODULE_LOAD_DECLINE;
 
 	con = ast_context_find("app_queue_gosub_virtual_context");
@@ -4810,7 +4812,7 @@
 
 static int reload(void)
 {
-	reload_queues();
+	reload_queues(1);
 	return 0;
 }
 

Modified: team/file/bridging/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_rpt.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_rpt.c (original)
+++ team/file/bridging/apps/app_rpt.c Thu Aug 16 20:23:40 2007
@@ -918,6 +918,7 @@
 	int	j;
 	struct ast_variable *vp, *var;
 	struct ast_config *cfg;
+	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
 #ifdef	__RPT_NOTCH
 	AST_DECLARE_APP_ARGS(strs,
 		AST_APP_ARG(str)[100];
@@ -929,7 +930,7 @@
 	ast_mutex_lock(&rpt_vars[n].lock);
 	if (rpt_vars[n].cfg)
 		ast_config_destroy(rpt_vars[n].cfg);
-	cfg = ast_config_load("rpt.conf");
+	cfg = ast_config_load("rpt.conf", config_flags);
 	if (!cfg) {
 		ast_mutex_unlock(&rpt_vars[n].lock);
 		ast_log(LOG_NOTICE, "Unable to open radio repeater configuration rpt.conf.  Radio Repeater disabled.\n");
@@ -7437,7 +7438,8 @@
 
 static int load_module(void)
 {
-	struct ast_config *cfg = ast_config_load("rpt.conf");
+	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
+	struct ast_config *cfg = ast_config_load("rpt.conf", config_flags);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "No such configuration file rpt.conf\n");
 		return AST_MODULE_LOAD_DECLINE;

Modified: team/file/bridging/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_voicemail.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/apps/app_voicemail.c (original)
+++ team/file/bridging/apps/app_voicemail.c Thu Aug 16 20:23:40 2007
@@ -260,7 +260,7 @@
 	AST_APP_OPTION_ARG('a', OPT_AUTOPLAY, OPT_ARG_PLAYFOLDER),
 });
 
-static int load_config(void);
+static int load_config(int reload);
 
 /*! \page vmlang Voicemail Language Syntaxes Supported
 
@@ -911,12 +911,13 @@
 	struct ast_category *cat=NULL;
 	char *category=NULL, *value=NULL, *new=NULL;
 	const char *tmp=NULL;
+	struct ast_flags config_flags = { CONFIG_FLAG_WITHCOMMENTS };
 					
 	if (!change_password_realtime(vmu, newpassword))
 		return;
 
 	/* check voicemail.conf */
-	if ((cfg = ast_config_load_with_comments(VOICEMAIL_CONFIG))) {
+	if ((cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags))) {
 		while ((category = ast_category_browse(cfg, category))) {
 			if (!strcasecmp(category, vmu->context)) {
 				if (!(tmp = ast_variable_retrieve(cfg, category, vmu->mailbox))) {
@@ -946,7 +947,7 @@
 	var = NULL;
 	/* check users.conf and update the password stored for the mailbox*/
 	/* if no vmsecret entry exists create one. */
-	if ((cfg = ast_config_load_with_comments("users.conf"))) {
+	if ((cfg = ast_config_load("users.conf", config_flags))) {
 		ast_debug(4, "we are looking for %s\n", vmu->mailbox);
 		while ((category = ast_category_browse(cfg, category))) {
 			ast_debug(4, "users.conf: %s\n", category);
@@ -1427,6 +1428,7 @@
 	const char *category = "";
 	struct ast_config *cfg=NULL;
 	struct odbc_obj *obj;
+	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
 
 	delete_file(dir, msgnum);
 	obj = ast_odbc_request_obj(odbc_database, 0);
@@ -1443,7 +1445,7 @@
 		else
 			ast_copy_string(fn, dir, sizeof(fn));
 		snprintf(full_fn, sizeof(full_fn), "%s.txt", fn);
-		cfg = ast_config_load(full_fn);
+		cfg = ast_config_load(full_fn, config_flags);
 		snprintf(full_fn, sizeof(full_fn), "%s.%s", fn, fmt);
 		fd = open(full_fn, O_RDWR);
 		if (fd < 0) {
@@ -3975,6 +3977,7 @@
 	int cmd = 0;
 	int retries = 0;
 	signed char zero_gain = 0;
+	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
 
 	while ((cmd >= 0) && (cmd != 't') && (cmd != '*')) {
 		if (cmd)
@@ -3995,7 +3998,7 @@
 			*duration = 0;
 
 			/* if we can't read the message metadata, stop now */
-			if (!(msg_cfg = ast_config_load(textfile))) {
+			if (!(msg_cfg = ast_config_load(textfile, config_flags))) {
 				cmd = 0;
 				break;
 			}
@@ -4733,6 +4736,7 @@
 	char filename[256], *cid;
 	const char *origtime, *context, *category, *duration;
 	struct ast_config *msg_cfg;
+	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
 
 	vms->starting = 0; 
 	make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
@@ -4782,7 +4786,7 @@
 	make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
 	snprintf(filename, sizeof(filename), "%s.txt", vms->fn2);
 	RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
-	msg_cfg = ast_config_load(filename);
+	msg_cfg = ast_config_load(filename, config_flags);
 	if (!msg_cfg) {
 		ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
 		return 0;
@@ -7850,7 +7854,7 @@
 	return RESULT_SUCCESS;
 }
 
-static int load_config(void)
+static int load_config(int reload)
 {
 	struct ast_vm_user *cur;
 	struct vm_zone *zcur;
@@ -7863,6 +7867,17 @@
 	char *q, *stringp;
 	int x;
 	int tmpadsi[4];
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+
+	if ((cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags)) == CONFIG_STATUS_FILEUNCHANGED) {
+		if ((ucfg = ast_config_load("users.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+			return 0;
+		ast_clear_flag(&config_flags, CONFIG_FLAG_FILEUNCHANGED);
+		cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags);
+	} else {
+		ast_clear_flag(&config_flags, CONFIG_FLAG_FILEUNCHANGED);
+		ucfg = ast_config_load("users.conf", config_flags);
+	}
 
 	/* set audio control prompts */
 	strcpy(listen_control_forward_key,DEFAULT_LISTEN_CONTROL_FORWARD_KEY);
@@ -7871,8 +7886,6 @@
 	strcpy(listen_control_restart_key,DEFAULT_LISTEN_CONTROL_RESTART_KEY);
 	strcpy(listen_control_stop_key,DEFAULT_LISTEN_CONTROL_STOP_KEY);
 	
-	cfg = ast_config_load(VOICEMAIL_CONFIG);
-
 	AST_LIST_LOCK(&users);
 	while ((cur = AST_LIST_REMOVE_HEAD(&users, list))) {
 		ast_set_flag(cur, VM_ALLOCED);
@@ -8259,7 +8272,7 @@
 		if ((val = ast_variable_retrieve(cfg, "general", "pollmailboxes")))
 			poll_mailboxes = ast_true(val);
 
-		if ((ucfg = ast_config_load("users.conf"))) {	
+		if (ucfg) {	
 			for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
 				if (!ast_true(ast_config_option(ucfg, cat, "hasvoicemail")))
 					continue;
@@ -8427,13 +8440,15 @@
 	} else {
 		AST_LIST_UNLOCK(&users);
 		ast_log(LOG_WARNING, "Failed to load configuration file.\n");
+		if (ucfg)
+			ast_config_destroy(ucfg);
 		return 0;
 	}
 }
 
 static int reload(void)
 {
-	return load_config();
+	return load_config(1);
 }
 
 static int unload_module(void)
@@ -8464,7 +8479,7 @@
 	/* compute the location of the voicemail spool directory */
 	snprintf(VM_SPOOL_DIR, sizeof(VM_SPOOL_DIR), "%s/voicemail/", ast_config_AST_SPOOL_DIR);
 
-	if ((res = load_config()))
+	if ((res = load_config(0)))
 		return res;
 
 	res = ast_register_application(app, vm_exec, synopsis_vm, descrip_vm);
@@ -8555,6 +8570,7 @@
 	const char *origtime, *context;
 	char *cid, *name, *num;
 	int retries = 0;
+	struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };
 
 	vms->starting = 0; 
 #ifdef IMAP_STORAGE
@@ -8605,7 +8621,7 @@
 	make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
 	snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
 	RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
-	msg_cfg = ast_config_load(filename);
+	msg_cfg = ast_config_load(filename, config_flags);
 	DISPOSE(vms->curdir, vms->curmsg);
 	if (!msg_cfg) {
 		ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);

Modified: team/file/bridging/cdr/cdr_adaptive_odbc.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/cdr/cdr_adaptive_odbc.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/cdr/cdr_adaptive_odbc.c (original)
+++ team/file/bridging/cdr/cdr_adaptive_odbc.c Thu Aug 16 20:23:40 2007
@@ -95,8 +95,9 @@
 	SQLLEN sqlptr;
 	int res = 0;
 	SQLHSTMT stmt = NULL;
-
-	cfg = ast_config_load(CONFIG);
+	struct ast_flags config_flags = { 0 }; /* Part of our config comes from the database */
+
+	cfg = ast_config_load(CONFIG, config_flags);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "Unable to load " CONFIG ".  No adaptive ODBC CDRs.\n");
 		return -1;

Modified: team/file/bridging/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/cdr/cdr_csv.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/cdr/cdr_csv.c (original)
+++ team/file/bridging/cdr/cdr_csv.c Thu Aug 16 20:23:40 2007
@@ -95,22 +95,24 @@
 static FILE *mf = NULL;
 
 
-static int load_config(void)
+static int load_config(int reload)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
 	const char *tmp;
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
 	usegmtime = 0;
 	loguniqueid = 0;
 	loguserfield = 0;
 	
-	cfg = ast_config_load(config);
+	cfg = ast_config_load(config, config_flags);
 	
 	if (!cfg) {
 		ast_log(LOG_WARNING, "unable to load config: %s\n", config);
 		return 0;
-	} 
+	} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
 	
 	var = ast_variable_browse(cfg, "csv");
 	if (!var) {
@@ -316,7 +318,7 @@
 {
 	int res;
 	
-	if(!load_config())
+	if(!load_config(0))
 		return AST_MODULE_LOAD_DECLINE;
 
 	res = ast_cdr_register(name, ast_module_info->description, csv_log);
@@ -330,7 +332,7 @@
 
 static int reload(void)
 {
-	load_config();
+	load_config(1);
 
 	return 0;
 }

Modified: team/file/bridging/cdr/cdr_custom.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/cdr/cdr_custom.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/cdr/cdr_custom.c (original)
+++ team/file/bridging/cdr/cdr_custom.c Thu Aug 16 20:23:40 2007
@@ -68,12 +68,16 @@
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 	int res = -1;
+
+	if ((cfg = ast_config_load("cdr_custom.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
 
 	strcpy(format, "");
 	strcpy(master, "");
 	ast_mutex_lock(&lock);
-	if((cfg = ast_config_load("cdr_custom.conf"))) {
+	if (cfg) {
 		var = ast_variable_browse(cfg, "mappings");
 		while(var) {
 			if (!ast_strlen_zero(var->name) && !ast_strlen_zero(var->value)) {

Modified: team/file/bridging/cdr/cdr_manager.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/cdr/cdr_manager.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/cdr/cdr_manager.c (original)
+++ team/file/bridging/cdr/cdr_manager.c Thu Aug 16 20:23:40 2007
@@ -52,15 +52,22 @@
 static int enablecdr = 0;
 struct ast_str *customfields;
 
-static int load_config(void)
+static int load_config(int reload)
 {
 	char *cat = NULL;
 	struct ast_config *cfg;
 	struct ast_variable *v;
-	
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
+
+	cfg = ast_config_load(CONF_FILE, config_flags);
+	if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+		return 0;
+
+	if (reload && customfields) {
+		ast_free(customfields);
+	}
 	customfields = NULL;
 
-	cfg = ast_config_load(CONF_FILE);
 	if (!cfg) {
 		/* Standard configuration */
 		ast_log(LOG_WARNING, "Failed to load configuration file. Module not activated.\n");
@@ -174,7 +181,7 @@
 	int res;
 
 	/* Configuration file */
-	if (!load_config())
+	if (!load_config(0))
 		return AST_MODULE_LOAD_DECLINE;
 	
 	res = ast_cdr_register(name, "Asterisk Manager Interface CDR Backend", manager_log);
@@ -187,12 +194,7 @@
 
 static int reload(void)
 {
-	if (customfields) {
-		ast_free(customfields);
-	}
-	
-	load_config();
-	return 0;
+	return load_config(1);
 }
 
 AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Asterisk Manager Interface CDR Backend",

Modified: team/file/bridging/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/cdr/cdr_odbc.c?view=diff&rev=79825&r1=79824&r2=79825
==============================================================================
--- team/file/bridging/cdr/cdr_odbc.c (original)
+++ team/file/bridging/cdr/cdr_odbc.c Thu Aug 16 20:23:40 2007
@@ -226,124 +226,124 @@
 	return 0;
 }
 
-static int odbc_load_module(void)
+static int odbc_load_module(int reload)
 {
 	int res = 0;
 	struct ast_config *cfg;
 	struct ast_variable *var;
 	const char *tmp;
+	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
 	ast_mutex_lock(&odbc_lock);
 
-	cfg = ast_config_load(config);
-	if (!cfg) {
-		ast_log(LOG_WARNING, "cdr_odbc: Unable to load config for ODBC CDR's: %s\n", config);
-		res = AST_MODULE_LOAD_DECLINE;
-		goto out;
-	}
+	do {
+		cfg = ast_config_load(config, config_flags);
+		if (!cfg) {
+			ast_log(LOG_WARNING, "cdr_odbc: Unable to load config for ODBC CDR's: %s\n", config);
+			res = AST_MODULE_LOAD_DECLINE;
+			break;
+		} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+			break;
 	
-	var = ast_variable_browse(cfg, "global");
-	if (!var) {
-		/* nothing configured */
-		goto out;
-	}
-
-	tmp = ast_variable_retrieve(cfg,"global","dsn");
-	if (tmp == NULL) {
-		ast_log(LOG_WARNING,"cdr_odbc: dsn not specified.  Assuming asteriskdb\n");
-		tmp = "asteriskdb";
-	}
-	dsn = strdup(tmp);
-	if (dsn == NULL) {
-		ast_log(LOG_ERROR,"cdr_odbc: Out of memory error.\n");
-		res = -1;
-		goto out;
-	}
-
-	tmp = ast_variable_retrieve(cfg,"global","dispositionstring");
-	if (tmp) {
-		dispositionstring = ast_true(tmp);
-	} else {
-		dispositionstring = 0;
-	}
-		
-	tmp = ast_variable_retrieve(cfg,"global","username");
-	if (tmp) {
-		username = strdup(tmp);
-		if (username == NULL) {
-			ast_log(LOG_ERROR,"cdr_odbc: Out of memory error.\n");
+		var = ast_variable_browse(cfg, "global");
+		if (!var) {
+			/* nothing configured */
+			break;
+		}
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "dsn")) == NULL) {
+			ast_log(LOG_WARNING, "cdr_odbc: dsn not specified.  Assuming asteriskdb\n");
+			tmp = "asteriskdb";
+		}
+		if (dsn)
+			ast_free(dsn);
+		dsn = ast_strdup(tmp);
+		if (dsn == NULL) {
 			res = -1;
-			goto out;
-		}
-	}
-
-	tmp = ast_variable_retrieve(cfg,"global","password");
-	if (tmp) {
-		password = strdup(tmp);
-		if (password == NULL) {
-			ast_log(LOG_ERROR,"cdr_odbc: Out of memory error.\n");
+			break;
+		}
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "dispositionstring")))
+			dispositionstring = ast_true(tmp);
+		else
+			dispositionstring = 0;
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "username"))) {
+			if (username)
+				ast_free(username);
+			username = ast_strdup(tmp);
+			if (username == NULL) {
+				res = -1;
+				break;
+			}
+		}
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "password"))) {
+			if (password)
+				ast_free(password);
+			password = ast_strdup(tmp);
+			if (password == NULL) {
+				res = -1;
+				break;
+			}
+		}
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "loguniqueid"))) {
+			loguniqueid = ast_true(tmp);
+			if (loguniqueid) {
+				ast_debug(1, "cdr_odbc: Logging uniqueid\n");
+			} else {
+				ast_debug(1, "cdr_odbc: Not logging uniqueid\n");
+			}
+		} else {
+			ast_debug(1, "cdr_odbc: Not logging uniqueid\n");
+			loguniqueid = 0;
+		}
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "usegmtime"))) {
+			usegmtime = ast_true(tmp);
+			if (usegmtime) {
+				ast_debug(1, "cdr_odbc: Logging in GMT\n");
+			} else {
+				ast_debug(1, "cdr_odbc: Not logging in GMT\n");
+			}
+		} else {
+			ast_debug(1, "cdr_odbc: Not logging in GMT\n");
+			usegmtime = 0;
+		}
+
+		if ((tmp = ast_variable_retrieve(cfg, "global", "table")) == NULL) {
+			ast_log(LOG_WARNING, "cdr_odbc: table not specified.  Assuming cdr\n");
+			tmp = "cdr";
+		}
+		if (table)
+			ast_free(table);
+		table = ast_strdup(tmp);
+		if (table == NULL) {
 			res = -1;
-			goto out;
-		}
-	}
-
-	tmp = ast_variable_retrieve(cfg,"global","loguniqueid");
-	if (tmp) {
-		loguniqueid = ast_true(tmp);
-		if (loguniqueid) {
-			ast_debug(1,"cdr_odbc: Logging uniqueid\n");
-		} else {
-			ast_debug(1,"cdr_odbc: Not logging uniqueid\n");
-		}
-	} else {
-		ast_debug(1,"cdr_odbc: Not logging uniqueid\n");
-		loguniqueid = 0;
-	}
-
-	tmp = ast_variable_retrieve(cfg,"global","usegmtime");
-	if (tmp) {
-		usegmtime = ast_true(tmp);
-		if (usegmtime) {
-			ast_debug(1,"cdr_odbc: Logging in GMT\n");
-		} else {
-			ast_debug(1,"cdr_odbc: Not logging in GMT\n");
-		}
-	} else {
-		ast_debug(1,"cdr_odbc: Not logging in GMT\n");
-		usegmtime = 0;
-	}
-
-	tmp = ast_variable_retrieve(cfg,"global","table");
-	if (tmp == NULL) {
-		ast_log(LOG_WARNING,"cdr_odbc: table not specified.  Assuming cdr\n");
-		tmp = "cdr";
-	}
-	table = strdup(tmp);
-	if (table == NULL) {
-		ast_log(LOG_ERROR,"cdr_odbc: Out of memory error.\n");
-		res = -1;
-		goto out;
-	}
-
-	ast_verb(3, "cdr_odbc: dsn is %s\n",dsn);
-	if (username) {
-		ast_verb(3, "cdr_odbc: username is %s\n",username);
-		ast_verb(3, "cdr_odbc: password is [secret]\n");
-	} else
-		ast_verb(3, "cdr_odbc: retreiving username and password from odbc config\n");
-	ast_verb(3, "cdr_odbc: table is %s\n",table);
-	
-	res = odbc_init();
-	if (res < 0) {
-		ast_log(LOG_ERROR, "cdr_odbc: Unable to connect to datasource: %s\n", dsn);
-		ast_verb(3, "cdr_odbc: Unable to connect to datasource: %s\n", dsn);
-		}
-	res = ast_cdr_register(name, ast_module_info->description, odbc_log);
-	if (res) {
-		ast_log(LOG_ERROR, "cdr_odbc: Unable to register ODBC CDR handling\n");
-	}
-out:
-	if (cfg)
+			break;
+		}
+

[... 3940 lines stripped ...]



More information about the svn-commits mailing list