[Asterisk-cvs] asterisk/apps app_alarmreceiver.c, 1.7, 1.8 app_directory.c, 1.31, 1.32 app_enumlookup.c, 1.12, 1.13 app_festival.c, 1.28, 1.29 app_meetme.c, 1.73, 1.74 app_privacy.c, 1.12, 1.13 app_queue.c, 1.117, 1.118 app_realtime.c, 1.5, 1.6 app_rpt.c, 1.27, 1.28 app_txtcidname.c, 1.9, 1.10 app_voicemail.c, 1.197, 1.198

markster at lists.digium.com markster at lists.digium.com
Tue Jan 25 00:08:01 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv27198/apps

Modified Files:
	app_alarmreceiver.c app_directory.c app_enumlookup.c 
	app_festival.c app_meetme.c app_privacy.c app_queue.c 
	app_realtime.c app_rpt.c app_txtcidname.c app_voicemail.c 
Log Message:
Merge config updates (bug #3406)


Index: app_alarmreceiver.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_alarmreceiver.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- app_alarmreceiver.c	21 Jan 2005 07:06:24 -0000	1.7
+++ app_alarmreceiver.c	25 Jan 2005 06:10:19 -0000	1.8
@@ -747,7 +747,7 @@
 
 	/* Read in the config file */
 
-	cfg = ast_load(ALMRCV_CONFIG);
+	cfg = ast_config_load(ALMRCV_CONFIG);
                                                                                                                                   
 	if(!cfg){
 	
@@ -817,7 +817,7 @@
 			strncpy(db_family, p, sizeof(db_family) - 1);
 			db_family[sizeof(db_family) - 1] = '\0';
 		}
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
 	}
 	return 0;
 

Index: app_directory.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_directory.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- app_directory.c	21 Jan 2005 07:06:24 -0000	1.31
+++ app_directory.c	25 Jan 2005 06:10:19 -0000	1.32
@@ -351,7 +351,7 @@
 		ast_log(LOG_WARNING, "directory requires an argument (context[,dialcontext])\n");
 		return -1;
 	}
-	cfg = ast_load(DIRECTORY_CONFIG);
+	cfg = ast_config_load(DIRECTORY_CONFIG);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "Unable to open directory configuration %s\n", DIRECTORY_CONFIG);
 		return -1;
@@ -400,7 +400,7 @@
 			}
 		}
 	}
-	ast_destroy(cfg);
+	ast_config_destroy(cfg);
 	LOCAL_USER_REMOVE(u);
 	return res;
 }

Index: app_enumlookup.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_enumlookup.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- app_enumlookup.c	21 Jan 2005 07:06:24 -0000	1.12
+++ app_enumlookup.c	25 Jan 2005 06:10:19 -0000	1.13
@@ -145,14 +145,14 @@
 	struct ast_config *cfg;
 	char *s;
 
-	cfg = ast_load(ENUM_CONFIG);
+	cfg = ast_config_load(ENUM_CONFIG);
 	if (cfg) {
 		if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
 			strncpy(h323driver, H323DRIVERDEFAULT, sizeof(h323driver) - 1);
 		} else {
 			strncpy(h323driver, s, sizeof(h323driver) - 1);
 		}
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
 		return 0;
 	}
 	ast_log(LOG_NOTICE, "No ENUM Config file, using defaults\n");

Index: app_festival.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_festival.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- app_festival.c	19 Dec 2004 21:13:41 -0000	1.28
+++ app_festival.c	25 Jan 2005 06:10:19 -0000	1.29
@@ -282,7 +282,7 @@
 	char *intstr;
 	
 	struct ast_config *cfg;
-	cfg = ast_load(FESTIVAL_CONFIG);
+	cfg = ast_config_load(FESTIVAL_CONFIG);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
 		return -1;
@@ -308,7 +308,7 @@
 	}
 	if (!vdata || ast_strlen_zero(vdata)) {
 		ast_log(LOG_WARNING, "festival requires an argument (text)\n");
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
 		return -1;
 	}
 	strncpy(data, vdata, sizeof(data) - 1);
@@ -326,7 +326,7 @@
 
     	if (fd < 0) {
 		ast_log(LOG_WARNING,"festival_client: can't get socket\n");
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
         	return -1;
 	}
         memset(&serv_addr, 0, sizeof(serv_addr));
@@ -335,7 +335,7 @@
 	        serverhost = ast_gethostbyname(host, &ahp);
 	        if (serverhost == (struct hostent *)0) {
         	    	ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n");
-			ast_destroy(cfg);
+			ast_config_destroy(cfg);
 	            	return -1;
         	}
 	        memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
@@ -345,7 +345,7 @@
 
 	if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) {
 		ast_log(LOG_WARNING,"festival_client: connect to server failed\n");
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
         	return -1;
     	}
     	
@@ -448,7 +448,7 @@
     		}
 	} while (strcmp(ack,"OK\n") != 0);
 	close(fd);
-	ast_destroy(cfg);
+	ast_config_destroy(cfg);
 	LOCAL_USER_REMOVE(u);                                                                                
 	return res;
 

Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- app_meetme.c	23 Jan 2005 09:05:01 -0000	1.73
+++ app_meetme.c	25 Jan 2005 06:10:19 -0000	1.74
@@ -1187,7 +1187,7 @@
 			}
 		} else {
 			/* Check the config */
-			cfg = ast_load("meetme.conf");
+			cfg = ast_config_load("meetme.conf");
 			if (!cfg) {
 				ast_log(LOG_WARNING, "No meetme.conf file :(\n");
 				return NULL;
@@ -1215,7 +1215,7 @@
 			if (!var) {
 				ast_log(LOG_DEBUG, "%s isn't a valid conference\n", confno);
 			}
-			ast_destroy(cfg);
+			ast_config_destroy(cfg);
 		}
 	} else if (dynamic_pin) {
 		/* Correct for the user selecting 'D' instead of 'd' to have
@@ -1373,7 +1373,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_load("meetme.conf");
+				cfg = ast_config_load("meetme.conf");
 				if (cfg) {
 					var = ast_variable_browse(cfg, "rooms");
 					while(var) {
@@ -1421,7 +1421,7 @@
 						}
 						var = var->next;
 					}
-					ast_destroy(cfg);
+					ast_config_destroy(cfg);
 				}
 			}
 			/* Select first conference number not in use */

Index: app_privacy.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_privacy.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- app_privacy.c	21 Jan 2005 07:06:24 -0000	1.12
+++ app_privacy.c	25 Jan 2005 06:10:19 -0000	1.13
@@ -82,7 +82,7 @@
 			}
 		}
 		/*Read in the config file*/
-		cfg = ast_load(PRIV_CONFIG);
+		cfg = ast_config_load(PRIV_CONFIG);
 		
 		
 		/*Play unidentified call*/
@@ -144,7 +144,7 @@
 				chan->priority+=100;
 		}
 		if (cfg) 
-			ast_destroy(cfg);
+			ast_config_destroy(cfg);
 	}
 
   LOCAL_USER_REMOVE (u);

Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- app_queue.c	21 Jan 2005 04:14:26 -0000	1.117
+++ app_queue.c	25 Jan 2005 06:10:19 -0000	1.118
@@ -2388,7 +2388,7 @@
 	int new;
 	char *general_val = NULL;
 	
-	cfg = ast_load("queues.conf");
+	cfg = ast_config_load("queues.conf");
 	if (!cfg) {
 		ast_log(LOG_NOTICE, "No call queueing config file (queues.conf), so no call queues\n");
 		return;
@@ -2578,7 +2578,7 @@
 		}
 		cat = ast_category_browse(cfg, cat);
 	}
-	ast_destroy(cfg);
+	ast_config_destroy(cfg);
 	q = queues;
 	ql = NULL;
 	while(q) {

Index: app_realtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_realtime.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- app_realtime.c	21 Jan 2005 07:06:24 -0000	1.5
+++ app_realtime.c	25 Jan 2005 06:10:19 -0000	1.6
@@ -185,7 +185,7 @@
 
 				pbx_builtin_setvar_helper(chan, vname, itt->value);
 			}
-			ast_destroy_realtime(var);
+			ast_variables_destroy(var);
 		} else if (option_verbose > 3)
 			ast_verbose(VERBOSE_PREFIX_4"No Realtime Matches Found.\n");
 	}

Index: app_rpt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- app_rpt.c	21 Jan 2005 07:06:24 -0000	1.27
+++ app_rpt.c	25 Jan 2005 06:10:19 -0000	1.28
@@ -3856,7 +3856,7 @@
 	/* start with blank config */
 	memset(&rpt_vars,0,sizeof(rpt_vars));
 
-	cfg = ast_load("rpt.conf");
+	cfg = ast_config_load("rpt.conf");
 	if (!cfg) {
 		ast_log(LOG_NOTICE, "Unable to open radio repeater configuration rpt.conf.  Radio Repeater disabled.\n");
 		pthread_exit(NULL);

Index: app_txtcidname.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_txtcidname.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- app_txtcidname.c	21 Jan 2005 07:06:24 -0000	1.9
+++ app_txtcidname.c	25 Jan 2005 06:10:19 -0000	1.10
@@ -87,14 +87,14 @@
 	struct ast_config *cfg;
 	char *s;
 
-	cfg = ast_load(ENUM_CONFIG);
+	cfg = ast_config_load(ENUM_CONFIG);
 	if (cfg) {
 		if (!(s=ast_variable_retrieve(cfg, "general", "h323driver"))) {
 			strncpy(h323driver, H323DRIVERDEFAULT, sizeof(h323driver) - 1);
 		} else {
 			strncpy(h323driver, s, sizeof(h323driver) - 1);
 		}
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
 		return 0;
 	}
 	ast_log(LOG_NOTICE, "No ENUM Config file, using defaults\n");

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -d -r1.197 -r1.198
--- app_voicemail.c	23 Jan 2005 09:05:01 -0000	1.197
+++ app_voicemail.c	25 Jan 2005 06:10:19 -0000	1.198
@@ -1072,7 +1072,7 @@
 		else
 			strncpy(fn, dir, sizeof(fn) - 1);
 		snprintf(full_fn, sizeof(full_fn), "%s.txt", fn);
-		cfg = ast_load(full_fn);
+		cfg = ast_config_load(full_fn);
 		snprintf(full_fn, sizeof(full_fn), "%s.%s", fn, fmt);
 		fd = open(full_fn, O_RDWR);
 		if (fd < 0) {
@@ -1144,7 +1144,7 @@
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
 	if (cfg)
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
 	if (fdm)
 		munmap(fdm, fdlen);
 	if (fd > -1)
@@ -3091,7 +3091,7 @@
 	
 				/* load the information on the source message so we can send an e-mail like a new message */
 				snprintf(miffile, sizeof(miffile), "%s/msg%04d.txt", dir, curmsg);
-				if ((mif=ast_load(miffile))) {
+				if ((mif=ast_config_load(miffile))) {
 	
 					/* set callerid and duration variables */
 					snprintf(callerid, sizeof(callerid), "FWD from: %s from %s", sender->fullname, ast_variable_retrieve(mif, NULL, "callerid"));
@@ -3116,7 +3116,7 @@
 						sendpage(myserveremail, vmtmp->pager, todircount, vmtmp->mailbox, chan->cid.cid_num, chan->cid.cid_name, duration, vmtmp);
 					}
 				  
-					ast_destroy(mif); /* or here */
+					ast_config_destroy(mif); /* or here */
 				}
 				/* Leave voicemail for someone */
 				manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, has_voicemail(ext_context, NULL));
@@ -3344,7 +3344,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);
-	msg_cfg = ast_load(filename);
+	msg_cfg = ast_config_load(filename);
 	if (!msg_cfg) {
 		ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
 		return 0;
@@ -3375,7 +3375,7 @@
 	/* Allow pressing '1' to skip envelope / callerid */
 	if (res == '1')
 		res = 0;
-	ast_destroy(msg_cfg);
+	ast_config_destroy(msg_cfg);
 
 	if (!res) {
 		make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
@@ -5139,7 +5139,7 @@
 	int x;
 	int tmpadsi[4];
 
-	cfg = ast_load(VOICEMAIL_CONFIG);
+	cfg = ast_config_load(VOICEMAIL_CONFIG);
 	ast_mutex_lock(&vmlock);
 	cur = users;
 	while (cur) {
@@ -5475,7 +5475,7 @@
 				tmpread = tmpwrite+len;
 			}
 		}
-		ast_destroy(cfg);
+		ast_config_destroy(cfg);
 		ast_mutex_unlock(&vmlock);
 		return 0;
 	} else {
@@ -5605,7 +5605,7 @@
 
 	make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
 	snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
-	msg_cfg = ast_load(filename);
+	msg_cfg = ast_config_load(filename);
 	if (!msg_cfg) {
 		ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
 		return 0;
@@ -5735,7 +5735,7 @@
 		}
 	}
 
-	ast_destroy(msg_cfg);
+	ast_config_destroy(msg_cfg);
 
 	if (!res) {
 		make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);




More information about the svn-commits mailing list