[asterisk-commits] murf: branch group/newcdr r75249 - in /team/group/newcdr: ./ apps/ include/as...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 16 11:40:03 CDT 2007


Author: murf
Date: Mon Jul 16 11:40:02 2007
New Revision: 75249

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75249
Log:
Merged revisions 75200,75227 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r75200 | file | 2007-07-16 08:39:29 -0600 (Mon, 16 Jul 2007) | 2 lines

Applications no longer need to call ast_module_user_add and ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application.

........
r75227 | file | 2007-07-16 09:57:01 -0600 (Mon, 16 Jul 2007) | 2 lines

I found this sillyness when I did my ast_module_user conversion. Return immediately if no data was passed to the Verbose application.

........

Modified:
    team/group/newcdr/   (props changed)
    team/group/newcdr/apps/app_adsiprog.c
    team/group/newcdr/apps/app_alarmreceiver.c
    team/group/newcdr/apps/app_amd.c
    team/group/newcdr/apps/app_authenticate.c
    team/group/newcdr/apps/app_cdr.c
    team/group/newcdr/apps/app_chanisavail.c
    team/group/newcdr/apps/app_channelredirect.c
    team/group/newcdr/apps/app_chanspy.c
    team/group/newcdr/apps/app_controlplayback.c
    team/group/newcdr/apps/app_db.c
    team/group/newcdr/apps/app_dial.c
    team/group/newcdr/apps/app_dictate.c
    team/group/newcdr/apps/app_directed_pickup.c
    team/group/newcdr/apps/app_directory.c
    team/group/newcdr/apps/app_disa.c
    team/group/newcdr/apps/app_dumpchan.c
    team/group/newcdr/apps/app_echo.c
    team/group/newcdr/apps/app_exec.c
    team/group/newcdr/apps/app_externalivr.c
    team/group/newcdr/apps/app_festival.c
    team/group/newcdr/apps/app_flash.c
    team/group/newcdr/apps/app_followme.c
    team/group/newcdr/apps/app_forkcdr.c
    team/group/newcdr/apps/app_getcpeid.c
    team/group/newcdr/apps/app_ices.c
    team/group/newcdr/apps/app_image.c
    team/group/newcdr/apps/app_ivrdemo.c
    team/group/newcdr/apps/app_macro.c
    team/group/newcdr/apps/app_meetme.c
    team/group/newcdr/apps/app_milliwatt.c
    team/group/newcdr/apps/app_minivm.c
    team/group/newcdr/apps/app_mixmonitor.c
    team/group/newcdr/apps/app_morsecode.c
    team/group/newcdr/apps/app_mp3.c
    team/group/newcdr/apps/app_nbscat.c
    team/group/newcdr/apps/app_osplookup.c
    team/group/newcdr/apps/app_page.c
    team/group/newcdr/apps/app_parkandannounce.c
    team/group/newcdr/apps/app_playback.c
    team/group/newcdr/apps/app_privacy.c
    team/group/newcdr/apps/app_queue.c
    team/group/newcdr/apps/app_read.c
    team/group/newcdr/apps/app_readfile.c
    team/group/newcdr/apps/app_record.c
    team/group/newcdr/apps/app_rpt.c
    team/group/newcdr/apps/app_sayunixtime.c
    team/group/newcdr/apps/app_senddtmf.c
    team/group/newcdr/apps/app_sendtext.c
    team/group/newcdr/apps/app_setcallerid.c
    team/group/newcdr/apps/app_skel.c
    team/group/newcdr/apps/app_sms.c
    team/group/newcdr/apps/app_softhangup.c
    team/group/newcdr/apps/app_speech_utils.c
    team/group/newcdr/apps/app_stack.c
    team/group/newcdr/apps/app_system.c
    team/group/newcdr/apps/app_talkdetect.c
    team/group/newcdr/apps/app_test.c
    team/group/newcdr/apps/app_transfer.c
    team/group/newcdr/apps/app_url.c
    team/group/newcdr/apps/app_userevent.c
    team/group/newcdr/apps/app_verbose.c
    team/group/newcdr/apps/app_voicemail.c
    team/group/newcdr/apps/app_waitforring.c
    team/group/newcdr/apps/app_while.c
    team/group/newcdr/apps/app_zapateller.c
    team/group/newcdr/apps/app_zapbarge.c
    team/group/newcdr/apps/app_zapras.c
    team/group/newcdr/apps/app_zapscan.c
    team/group/newcdr/include/asterisk/pbx.h
    team/group/newcdr/main/pbx.c

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul 16 11:40:02 2007
@@ -1,1 +1,1 @@
-/trunk:1-75188
+/trunk:1-75248

Modified: team/group/newcdr/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_adsiprog.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_adsiprog.c (original)
+++ team/group/newcdr/apps/app_adsiprog.c Mon Jul 16 11:40:02 2007
@@ -1548,10 +1548,7 @@
 
 static int adsi_exec(struct ast_channel *chan, void *data)
 {
-	int res=0;
-	struct ast_module_user *u;
-
-	u = ast_module_user_add(chan);
+	int res = 0;
 	
 	if (ast_strlen_zero(data))
 		data = "asterisk.adsi";
@@ -1564,8 +1561,6 @@
 			ast_verbose(VERBOSE_PREFIX_3 "ADSI Available on CPE.  Attempting Upload.\n");
 		res = adsi_prog(chan, data);
 	}
-
-	ast_module_user_remove(u);
 	
 	return res;
 }

Modified: team/group/newcdr/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_alarmreceiver.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_alarmreceiver.c (original)
+++ team/group/newcdr/apps/app_alarmreceiver.c Mon Jul 16 11:40:02 2007
@@ -628,14 +628,11 @@
 static int alarmreceiver_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u;
 	event_node_t *elp, *efree;
 	char signalling_type[64] = "";
 
 	event_node_t *event_head = NULL;
 
-	u = ast_module_user_add(chan);
-
 	/* Set write and read formats to ULAW */
 
 	if(option_verbose >= 4)
@@ -643,13 +640,11 @@
 
 	if (ast_set_write_format(chan,AST_FORMAT_ULAW)){
 		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
-		ast_module_user_remove(u);
 		return -1;
 	}
 	
 	if (ast_set_read_format(chan,AST_FORMAT_ULAW)){
 		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name);
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -664,13 +659,8 @@
 		ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Answering channel\n");
 
 	if (chan->_state != AST_STATE_UP) {
-	
-		res = ast_answer(chan);
-		
-		if (res) {
-			ast_module_user_remove(u);
+		if ((res = ast_answer(chan)))
 			return -1;
-		}
 	}
 
 	/* Wait for the connection to settle post-answer */
@@ -721,9 +711,6 @@
 		elp = elp->next;
 		ast_free(efree);
 	}
-
-
-	ast_module_user_remove(u);
 
 	return 0;
 }

Modified: team/group/newcdr/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_amd.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_amd.c (original)
+++ team/group/newcdr/apps/app_amd.c Mon Jul 16 11:40:02 2007
@@ -318,11 +318,7 @@
 
 static int amd_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u = NULL;
-
-	u = ast_module_user_add(chan);
 	isAnsweringMachine(chan, data);
-	ast_module_user_remove(u);
 
 	return 0;
 }

Modified: team/group/newcdr/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_authenticate.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_authenticate.c (original)
+++ team/group/newcdr/apps/app_authenticate.c Mon Jul 16 11:40:02 2007
@@ -90,7 +90,6 @@
 {
 	int res=0;
 	int retries;
-	struct ast_module_user *u;
 	char passwd[256];
 	char *prompt;
 	int maxdigits;
@@ -107,15 +106,10 @@
 		ast_log(LOG_WARNING, "Authenticate requires an argument(password)\n");
 		return -1;
 	}
-	
-	u = ast_module_user_add(chan);
 
 	if (chan->_state != AST_STATE_UP) {
-		res = ast_answer(chan);
-		if (res) {
-			ast_module_user_remove(u);
+		if ((res = ast_answer(chan)))
 			return -1;
-		}
 	}
 	
 	argcopy = ast_strdupa(data);
@@ -217,7 +211,7 @@
 			res = ast_waitstream(chan, "");
 		res = -1;
 	}
-	ast_module_user_remove(u);
+
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_cdr.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_cdr.c (original)
+++ team/group/newcdr/apps/app_cdr.c Mon Jul 16 11:40:02 2007
@@ -46,15 +46,8 @@
 
 static int nocdr_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
-	
-	u = ast_module_user_add(chan);
-
-	if (chan->cdr) {
+	if (chan->cdr)
 		ast_set_flag(chan->cdr, AST_CDR_FLAG_POST_DISABLED);
-	}
-
-	ast_module_user_remove(u);
 
 	return 0;
 }

Modified: team/group/newcdr/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_chanisavail.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_chanisavail.c (original)
+++ team/group/newcdr/apps/app_chanisavail.c Mon Jul 16 11:40:02 2007
@@ -69,7 +69,6 @@
 {
 	int res=-1, inuse=-1, option_state=0, string_compare=0;
 	int status;
-	struct ast_module_user *u;
 	char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
 	struct ast_channel *tempchan;
 	AST_DECLARE_APP_ARGS(args,
@@ -81,8 +80,6 @@
 		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (Zap/1&Zap/2)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 
 	info = ast_strdupa(data); 
 
@@ -108,7 +105,6 @@
 			number = strchr(tech, '/');
 			if (!number) {
 				ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n");
-				ast_module_user_remove(u);
 				return -1;
 			}
 			*number = '\0';
@@ -151,7 +147,6 @@
 		pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
 	}
 
-	ast_module_user_remove(u);
 	return 0;
 }
 

Modified: team/group/newcdr/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_channelredirect.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_channelredirect.c (original)
+++ team/group/newcdr/apps/app_channelredirect.c Mon Jul 16 11:40:02 2007
@@ -52,7 +52,6 @@
 static int asyncgoto_exec(struct ast_channel *chan, void *data)
 {
 	int res = -1;
-	struct ast_module_user *u;
 	char *info, *context, *exten, *priority;
 	int prio = 1;
 	struct ast_channel *chan2 = NULL;
@@ -66,8 +65,6 @@
 		ast_log(LOG_WARNING, "%s requires an argument (channel|[[context|]exten|]priority)\n", app);
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 
 	info = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, info);
@@ -115,7 +112,6 @@
  chanquit:
 	ast_mutex_unlock(&chan2->lock);
  quit:
-	ast_module_user_remove(u);
 
 	return res;
 }

Modified: team/group/newcdr/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_chanspy.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_chanspy.c (original)
+++ team/group/newcdr/apps/app_chanspy.c Mon Jul 16 11:40:02 2007
@@ -626,7 +626,6 @@
 
 static int chanspy_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	char *options = NULL;
 	char *spec = NULL;
 	char *argv[2];
@@ -641,8 +640,6 @@
 
 	data = ast_strdupa(data);
 
-	u = ast_module_user_add(chan);
-
 	if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
 		spec = argv[0];
 		if (argc > 1)
@@ -680,7 +677,6 @@
 	oldwf = chan->writeformat;
 	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -702,14 +698,11 @@
 	if (oldwf && ast_set_write_format(chan, oldwf) < 0)
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
 static int extenspy_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	char *options = NULL;
 	char *exten = NULL;
 	char *context = NULL;
@@ -725,8 +718,6 @@
 
 	data = ast_strdupa(data);
 
-	u = ast_module_user_add(chan);
-
 	if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
 		context = argv[0];
 		if (!ast_strlen_zero(argv[0]))
@@ -765,7 +756,6 @@
 	oldwf = chan->writeformat;
 	if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -787,8 +777,6 @@
 	if (oldwf && ast_set_write_format(chan, oldwf) < 0)
 		ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_controlplayback.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_controlplayback.c (original)
+++ team/group/newcdr/apps/app_controlplayback.c Mon Jul 16 11:40:02 2007
@@ -93,7 +93,6 @@
 	int skipms = 0;
 	long offsetms = 0;
 	char offsetbuf[20];
-	struct ast_module_user *u;
 	char *tmp;
 	int argc;
 	char *argv[8] = { NULL, };
@@ -114,8 +113,6 @@
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 	
 	tmp = ast_strdupa(data);
 
@@ -123,7 +120,6 @@
 
 	if (argc < 1) {
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -165,8 +161,6 @@
 	snprintf(offsetbuf, sizeof(offsetbuf), "%ld", offsetms);
 	pbx_builtin_setvar_helper(chan, "CPLAYBACKOFFSET", offsetbuf);
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_db.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_db.c (original)
+++ team/group/newcdr/apps/app_db.c Mon Jul 16 11:40:02 2007
@@ -68,9 +68,6 @@
 static int deltree_exec(struct ast_channel *chan, void *data)
 {
 	char *argv, *family, *keytree;
-	struct ast_module_user *u;
-
-	u = ast_module_user_add(chan);
 
 	argv = ast_strdupa(data);
 
@@ -79,7 +76,6 @@
 		keytree = strsep(&argv, "\0");
 			if (!family || !keytree) {
 				ast_debug(1, "Ignoring; Syntax error in argument\n");
-				ast_module_user_remove(u);
 				return 0;
 			}
 		if (ast_strlen_zero(keytree))
@@ -101,18 +97,13 @@
 			ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
 	}
 
-	ast_module_user_remove(u);
-
 	return 0;
 }
 
 static int del_exec(struct ast_channel *chan, void *data)
 {
 	char *argv, *family, *key;
-	struct ast_module_user *u;
 	static int deprecation_warning = 0;
-
-	u = ast_module_user_add(chan);
 
 	if (!deprecation_warning) {
 		deprecation_warning = 1;
@@ -126,7 +117,6 @@
 		key = strsep(&argv, "\0");
 		if (!family || !key) {
 			ast_debug(1, "Ignoring; Syntax error in argument\n");
-			ast_module_user_remove(u);
 			return 0;
 		}
 		if (option_verbose > 2)
@@ -138,8 +128,6 @@
 	} else {
 		ast_debug(1, "Ignoring, no parameters\n");
 	}
-
-	ast_module_user_remove(u);
 	
 	return 0;
 }

Modified: team/group/newcdr/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_dial.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_dial.c (original)
+++ team/group/newcdr/apps/app_dial.c Mon Jul 16 11:40:02 2007
@@ -1195,7 +1195,6 @@
 static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags, int *continue_exec)
 {
 	int res = -1;	/* default: error */
-	struct ast_module_user *u;
 	char *rest, *cur;	/* scan the list of destinations */
 	struct chanlist *outgoing = NULL;	/* list of destinations */
 	struct ast_channel *peer;
@@ -1233,8 +1232,6 @@
 		pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);	/* XXX is this the right place ? */
 
 	parse = ast_strdupa(data);
 	
@@ -1820,7 +1817,6 @@
 	}
 
 done:
-	ast_module_user_remove(u);    	/* XXX probably not the right place for this. */
 	return res;
 }
 
@@ -1838,15 +1834,12 @@
 	char *announce = NULL, *dialdata = NULL;
 	const char *context = NULL;
 	int sleep = 0, loops = 0, res = -1;
-	struct ast_module_user *u;
 	struct ast_flags peerflags;
 	
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "RetryDial requires an argument!\n");
 		return -1;
 	}	
-
-	u = ast_module_user_add(chan);
 
 	announce = ast_strdupa(data);
 
@@ -1934,7 +1927,6 @@
 	if (ast_test_flag(chan, AST_FLAG_MOH))
 		ast_moh_stop(chan);
  done:
-	ast_module_user_remove(u);
 	return res;
 }
 
@@ -1946,9 +1938,8 @@
 	res = ast_unregister_application(app);
 	res |= ast_unregister_application(rapp);
 
-	if ((con = ast_context_find("app_dial_gosub_virtual_context"))) {
+	if ((con = ast_context_find("app_dial_gosub_virtual_context")))
 		ast_context_remove_extension2(con, "s", 1, NULL);
-	}
 
 	return res;
 }

Modified: team/group/newcdr/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_dictate.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_dictate.c (original)
+++ team/group/newcdr/apps/app_dictate.c Mon Jul 16 11:40:02 2007
@@ -89,7 +89,6 @@
 	struct ast_flags flags = {0};
 	struct ast_filestream *fs;
 	struct ast_frame *f = NULL;
-	struct ast_module_user *u;
 	int ffactor = 320 * 80,
 		res = 0,
 		done = 0,
@@ -101,8 +100,6 @@
 		len = 0,
 		maxlen = 0,
 		mode = 0;
-		
-	u = ast_module_user_add(chan);
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
 	if (!ast_strlen_zero(data)) {
@@ -122,7 +119,6 @@
 	oldr = chan->readformat;
 	if ((res = ast_set_read_format(chan, AST_FORMAT_SLINEAR)) < 0) {
 		ast_log(LOG_WARNING, "Unable to set to linear mode.\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -330,7 +326,6 @@
 	if (oldr) {
 		ast_set_read_format(chan, oldr);
 	}
-	ast_module_user_remove(u);
 	return 0;
 }
 

Modified: team/group/newcdr/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_directed_pickup.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_directed_pickup.c (original)
+++ team/group/newcdr/apps/app_directed_pickup.c Mon Jul 16 11:40:02 2007
@@ -133,7 +133,6 @@
 static int pickup_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u = NULL;
 	char *tmp = ast_strdupa(data);
 	char *exten = NULL, *context = NULL;
 
@@ -141,8 +140,6 @@
 		ast_log(LOG_WARNING, "Pickup requires an argument (extension)!\n");
 		return -1;	
 	}
-
-	u = ast_module_user_add(chan);
 	
 	/* Parse extension (and context if there) */
 	while (!ast_strlen_zero(tmp) && (exten = strsep(&tmp, "&"))) {
@@ -157,8 +154,6 @@
 		}
 		ast_log(LOG_NOTICE, "No target channel found for %s.\n", exten);
 	}
-
-	ast_module_user_remove(u);
 
 	return res;
 }

Modified: team/group/newcdr/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_directory.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_directory.c (original)
+++ team/group/newcdr/apps/app_directory.c Mon Jul 16 11:40:02 2007
@@ -566,7 +566,6 @@
 static int directory_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u;
 	struct ast_config *cfg, *ucfg;
 	int last = 1;
 	int readext = 0;
@@ -584,8 +583,6 @@
 		return -1;
 	}
 
-	u = ast_module_user_add(chan);
-
 	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
@@ -605,7 +602,6 @@
 	cfg = realtime_directory(args.vmcontext);
 	if (!cfg) {
 		ast_log(LOG_ERROR, "Unable to read the configuration data!\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 	
@@ -640,7 +636,6 @@
 	if (ucfg)
 		ast_config_destroy(ucfg);
 	ast_config_destroy(cfg);
-	ast_module_user_remove(u);
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_disa.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_disa.c (original)
+++ team/group/newcdr/apps/app_disa.c Mon Jul 16 11:40:02 2007
@@ -123,7 +123,6 @@
 	int i,j,k,x,did_ignore,special_noanswer;
 	int firstdigittimeout = 20000;
 	int digittimeout = 10000;
-	struct ast_module_user *u;
 	struct ast_flags flags;
 	char *tmp, exten[AST_MAX_EXTENSION],acctcode[20]="";
 	char pwline[256];
@@ -145,8 +144,6 @@
 		ast_log(LOG_WARNING, "DISA requires an argument (passcode/passcode file)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 	
 	if (chan->pbx) {
 		firstdigittimeout = chan->pbx->rtimeout*1000;
@@ -155,12 +152,10 @@
 	
 	if (ast_set_write_format(chan,AST_FORMAT_ULAW)) {
 		ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n", chan->name);
-		ast_module_user_remove(u);
 		return -1;
 	}
 	if (ast_set_read_format(chan,AST_FORMAT_ULAW)) {
 		ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n", chan->name);
-		ast_module_user_remove(u);
 		return -1;
 	}
 	
@@ -218,13 +213,11 @@
 			
 		f = ast_read(chan);
 		if (f == NULL) {
-			ast_module_user_remove(u);
 			return -1;
 		}
 		if ((f->frametype == AST_FRAME_CONTROL) &&
 		    (f->subclass == AST_CONTROL_HANGUP)) {
 			ast_frfree(f);
-			ast_module_user_remove(u);
 			return -1;
 		}
 		if (f->frametype == AST_FRAME_VOICE) {
@@ -254,7 +247,6 @@
 						fp = fopen(args.passcode,"r");
 						if (!fp) {
 							ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
-							ast_module_user_remove(u);
 							return -1;
 						}
 						pwline[0] = 0;
@@ -361,7 +353,6 @@
 			if (special_noanswer) flags.flags = 0;
 			ast_cdr_reset(chan->cdr, &flags);
 			ast_explicit_goto(chan, args.context, exten, 1);
-			ast_module_user_remove(u);
 			return 0;
 		}
 	}
@@ -382,7 +373,6 @@
 		ast_frfree(f);
 	}
 	ast_playtones_stop(chan);
-	ast_module_user_remove(u);
 	return -1;
 }
 

Modified: team/group/newcdr/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_dumpchan.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_dumpchan.c (original)
+++ team/group/newcdr/apps/app_dumpchan.c Mon Jul 16 11:40:02 2007
@@ -142,14 +142,11 @@
 
 static int dumpchan_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	struct ast_str *vars = ast_str_alloca(BUFSIZ * 4); /* XXX very large! */
 	char info[1024];
 	int level = 0;
 	static char *line = "================================================================================";
 	
-	u = ast_module_user_add(chan);
-
 	if (!ast_strlen_zero(data)) 
 		level = atoi(data);
 
@@ -157,8 +154,6 @@
 	serialize_showchan(chan, info, sizeof(info));
 	if (option_verbose >= level)
 		ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars->str, line);
-
-	ast_module_user_remove(u);
 	
 	return 0;
 }

Modified: team/group/newcdr/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_echo.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_echo.c (original)
+++ team/group/newcdr/apps/app_echo.c Mon Jul 16 11:40:02 2007
@@ -55,9 +55,6 @@
 {
 	int res = -1;
 	int format;
-	struct ast_module_user *u;
-
-	u = ast_module_user_add(chan);
 
 	format = ast_best_codec(chan->nativeformats);
 	ast_set_write_format(chan, format);
@@ -81,7 +78,6 @@
 		ast_frfree(f);
 	}
 end:
-	ast_module_user_remove(u);
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_exec.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_exec.c (original)
+++ team/group/newcdr/apps/app_exec.c Mon Jul 16 11:40:02 2007
@@ -90,15 +90,12 @@
 
 static int exec_exec(struct ast_channel *chan, void *data)
 {
-	int res=0;
-	struct ast_module_user *u;
+	int res = 0;
 	char *s, *appname, *endargs, args[MAXRESULT] = "";
 	struct ast_app *app;
 
 	if (ast_strlen_zero(data))
 		return 0;
-
-	u = ast_module_user_add(chan);
 	
 	s = ast_strdupa(data);
 	appname = strsep(&s, "(");
@@ -118,22 +115,17 @@
 		}
 	}
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
 static int tryexec_exec(struct ast_channel *chan, void *data)
 {
-	int res=0;
-	struct ast_module_user *u;
+	int res = 0;
 	char *s, *appname, *endargs, args[MAXRESULT] = "";
 	struct ast_app *app;
 
 	if (ast_strlen_zero(data))
 		return 0;
-
-	u = ast_module_user_add(chan);
 
 	s = ast_strdupa(data);
 	appname = strsep(&s, "(");
@@ -154,21 +146,16 @@
 		}
 	}
 
-	ast_module_user_remove(u);
-
 	return 0;
 }
 
 static int execif_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u;
 	char *myapp = NULL;
 	char *mydata = NULL;
 	char *expr = NULL;
 	struct ast_app *app = NULL;
-
-	u = ast_module_user_add(chan);
 
 	expr = ast_strdupa(data);
 
@@ -193,8 +180,6 @@
 		ast_log(LOG_ERROR,"Invalid Syntax.\n");
 		res = -1;
 	}
-		
-	ast_module_user_remove(u);
 
 	return res;
 }

Modified: team/group/newcdr/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_externalivr.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_externalivr.c (original)
+++ team/group/newcdr/apps/app_externalivr.c Mon Jul 16 11:40:02 2007
@@ -243,7 +243,6 @@
 
 static int app_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *lu;
 	struct playlist_entry *entry;
 	const char *args = data;
 	int child_stdin[2] = { 0,0 };
@@ -265,8 +264,6 @@
 	struct ivr_localuser *u = &foo;
 	sigset_t fullset, oldset;
 
-	lu = ast_module_user_add(chan);
-
 	sigfillset(&fullset);
 	pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
 
@@ -275,7 +272,6 @@
 	
 	if (ast_strlen_zero(args)) {
 		ast_log(LOG_WARNING, "ExternalIVR requires a command to execute\n");
-		ast_module_user_remove(lu);
 		return -1;	
 	}
 
@@ -571,8 +567,6 @@
 	while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
 		ast_free(entry);
 
-	ast_module_user_remove(lu);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_festival.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_festival.c (original)
+++ team/group/newcdr/apps/app_festival.c Mon Jul 16 11:40:02 2007
@@ -284,7 +284,6 @@
 {
 	int usecache;
 	int res=0;
-	struct ast_module_user *u;
  	struct sockaddr_in serv_addr;
 	struct hostent *serverhost;
 	struct ast_hostent ahp;
@@ -323,12 +322,9 @@
 		return -1;
 	}
 
-	u = ast_module_user_add(chan);
-
 	cfg = ast_config_load(FESTIVAL_CONFIG);
 	if (!cfg) {
 		ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG);
-		ast_module_user_remove(u);
 		return -1;
 	}
 	if (!(host = ast_variable_retrieve(cfg, "general", "host"))) {
@@ -385,7 +381,6 @@
 	if (fd < 0) {
 		ast_log(LOG_WARNING,"festival_client: can't get socket\n");
 		ast_config_destroy(cfg);
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -398,7 +393,6 @@
 		if (serverhost == (struct hostent *)0) {
 			ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n");
 			ast_config_destroy(cfg);
-			ast_module_user_remove(u);
 			return -1;
 		}
 		memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length);
@@ -410,7 +404,6 @@
 	if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) {
 		ast_log(LOG_WARNING,"festival_client: connect to server failed\n");
 		ast_config_destroy(cfg);
-		ast_module_user_remove(u);
         	return -1;
     	}
     	
@@ -502,7 +495,6 @@
                                ast_log(LOG_WARNING,"Unable to read from cache/festival fd\n");
 			       close(fd);
 			       ast_config_destroy(cfg);
-			       ast_module_user_remove(u);
                                return -1;
                        }
                        n += read_data;
@@ -529,7 +521,6 @@
 	} while (strcmp(ack,"OK\n") != 0);
 	close(fd);
 	ast_config_destroy(cfg);
-	ast_module_user_remove(u);
 	return res;
 
 }

Modified: team/group/newcdr/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_flash.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_flash.c (original)
+++ team/group/newcdr/apps/app_flash.c Mon Jul 16 11:40:02 2007
@@ -73,15 +73,12 @@
 {
 	int res = -1;
 	int x;
-	struct ast_module_user *u;
 	struct zt_params ztp;
 
 	if (strcasecmp(chan->tech->type, "Zap")) {
 		ast_log(LOG_WARNING, "%s is not a Zap channel\n", chan->name);
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 	
 	memset(&ztp, 0, sizeof(ztp));
 	res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
@@ -104,8 +101,6 @@
 	} else
 		ast_log(LOG_WARNING, "Unable to get parameters of %s: %s\n", chan->name, strerror(errno));
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_followme.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_followme.c (original)
+++ team/group/newcdr/apps/app_followme.c Mon Jul 16 11:40:02 2007
@@ -899,7 +899,6 @@
 	struct call_followme *f;
 	struct number *nm, *newnm;
 	int res = 0;
-	struct ast_module_user *u;
 	char *argstr;
 	char namerecloc[255];
 	int duration = 0;
@@ -921,8 +920,6 @@
 		ast_log(LOG_WARNING, "%s requires an argument (followmeid)\n",app);
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 
 	AST_STANDARD_APP_ARGS(args, argstr);
 
@@ -1043,8 +1040,6 @@
 	}
 	outrun:
 	
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_forkcdr.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_forkcdr.c (original)
+++ team/group/newcdr/apps/app_forkcdr.c Mon Jul 16 11:40:02 2007
@@ -77,21 +77,17 @@
 static int forkcdr_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u;
 
 	if (!chan->cdr) {
 		ast_log(LOG_WARNING, "Channel does not have a CDR\n");
 		return 0;
 	}
 
-	u = ast_module_user_add(chan);
-
 	if (!ast_strlen_zero(data))
 		ast_set2_flag(chan->cdr, strchr(data, 'v'), AST_CDR_FLAG_KEEP_VARS);
 	
 	ast_cdr_fork(chan);
 
-	ast_module_user_remove(u);
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_getcpeid.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_getcpeid.c (original)
+++ team/group/newcdr/apps/app_getcpeid.c Mon Jul 16 11:40:02 2007
@@ -66,15 +66,12 @@
 static int cpeid_exec(struct ast_channel *chan, void *idata)
 {
 	int res=0;
-	struct ast_module_user *u;
 	unsigned char cpeid[4];
 	int gotgeometry = 0;
 	int gotcpeid = 0;
 	int width, height, buttons;
 	char *data[4];
 	unsigned int x;
-
-	u = ast_module_user_add(chan);
 
 	for (x = 0; x < 4; x++)
 		data[x] = alloca(80);
@@ -125,7 +122,7 @@
 			ast_adsi_unload_session(chan);
 		}
 	}
-	ast_module_user_remove(u);
+
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_ices.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_ices.c (original)
+++ team/group/newcdr/apps/app_ices.c Mon Jul 16 11:40:02 2007
@@ -103,8 +103,7 @@
 
 static int ices_exec(struct ast_channel *chan, void *data)
 {
-	int res=0;
-	struct ast_module_user *u;
+	int res = 0;
 	int fds[2];
 	int ms = -1;
 	int pid = -1;
@@ -119,14 +118,11 @@
 		ast_log(LOG_WARNING, "ICES requires an argument (configfile.xml)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 	
 	last = ast_tv(0, 0);
 	
 	if (pipe(fds)) {
 		ast_log(LOG_WARNING, "Unable to create pipe\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 	flags = fcntl(fds[1], F_GETFL);
@@ -141,7 +137,6 @@
 		close(fds[0]);
 		close(fds[1]);
 		ast_log(LOG_WARNING, "Answer failed!\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -151,7 +146,6 @@
 		close(fds[0]);
 		close(fds[1]);
 		ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 	if (((char *)data)[0] == '/')
@@ -201,8 +195,6 @@
 	if (!res && oreadformat)
 		ast_set_read_format(chan, oreadformat);
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_image.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_image.c (original)
+++ team/group/newcdr/apps/app_image.c Mon Jul 16 11:40:02 2007
@@ -61,15 +61,12 @@
 static int sendimage_exec(struct ast_channel *chan, void *data)
 {
 	int res = 0;
-	struct ast_module_user *u;
 	char *parse;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(filename);
 		AST_APP_ARG(options);
 	);
 	
-	u = ast_module_user_add(chan);
-
 	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
@@ -85,15 +82,12 @@
 	if (!ast_supports_images(chan)) {
 		/* Does not support transport */
 		pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "NOSUPPORT");
-		ast_module_user_remove(u);
 		return 0;
 	}
 
 	if (!(res = ast_send_image(chan, args.filename)))
 		pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "OK");
-	
-	ast_module_user_remove(u);
-	
+		
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_ivrdemo.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_ivrdemo.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_ivrdemo.c (original)
+++ team/group/newcdr/apps/app_ivrdemo.c Mon Jul 16 11:40:02 2007
@@ -92,15 +92,12 @@
 static int skel_exec(struct ast_channel *chan, void *data)
 {
 	int res=0;
-	struct ast_module_user *u;
 	
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
 		return -1;
 	}
 	
-	u = ast_module_user_add(chan);
-
 	/* Do our thing here */
 
 	if (chan->_state != AST_STATE_UP)
@@ -108,8 +105,6 @@
 	if (!res)
 		res = ast_ivr_menu_run(chan, &ivr_demo, data);
 	
-	ast_module_user_remove(u);
-
 	return res;
 }
 

Modified: team/group/newcdr/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_macro.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_macro.c (original)
+++ team/group/newcdr/apps/app_macro.c Mon Jul 16 11:40:02 2007
@@ -166,14 +166,11 @@
 	char *save_macro_context;
 	char *save_macro_priority;
 	char *save_macro_offset;
-	struct ast_module_user *u;
  
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Macro() requires arguments. See \"show application macro\" for help.\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 
 	/* does the user want a deeper rabbit hole? */
 	s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
@@ -193,7 +190,6 @@
 
 	if (depth >= maxdepth) {
 		ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
-		ast_module_user_remove(u);
 		return 0;
 	}
 	snprintf(depthc, sizeof(depthc), "%d", depth + 1);
@@ -204,7 +200,6 @@
 	macro = strsep(&rest, "|");
 	if (ast_strlen_zero(macro)) {
 		ast_log(LOG_WARNING, "Invalid macro name specified\n");
-		ast_module_user_remove(u);
 		return 0;
 	}
 
@@ -214,7 +209,6 @@
 			ast_log(LOG_WARNING, "No such context '%s' for macro '%s'\n", fullmacro, macro);
 		else
 			ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
-		ast_module_user_remove(u);
 		return 0;
 	}
 
@@ -225,8 +219,6 @@
 		if (ast_context_lockmacro(fullmacro)) {
 			ast_log(LOG_WARNING, "Failed to lock macro '%s' as in-use\n", fullmacro);
 			ast_autoservice_stop(chan);
-			ast_module_user_remove(u);
-
 			return 0;
 		}
 		ast_autoservice_stop(chan);
@@ -474,8 +466,6 @@
 			res = 0;
 		}
 	}
-	
-	ast_module_user_remove(u);
 
 	return res;
 }
@@ -494,14 +484,9 @@
 {
 	char *expr = NULL, *label_a = NULL, *label_b = NULL;
 	int res = 0;
-	struct ast_module_user *u;
-
-	u = ast_module_user_add(chan);
-
-	if (!(expr = ast_strdupa(data))) {
-		ast_module_user_remove(u);
+
+	if (!(expr = ast_strdupa(data)))
 		return -1;
-	}
 
 	if ((label_a = strchr(expr, '?'))) {
 		*label_a = '\0';
@@ -517,8 +502,6 @@
 	} else
 		ast_log(LOG_WARNING, "Invalid Syntax.\n");
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 			

Modified: team/group/newcdr/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/apps/app_meetme.c?view=diff&rev=75249&r1=75248&r2=75249
==============================================================================
--- team/group/newcdr/apps/app_meetme.c (original)
+++ team/group/newcdr/apps/app_meetme.c Mon Jul 16 11:40:02 2007
@@ -2486,7 +2486,6 @@
 /*! \brief The MeetmeCount application */
 static int count_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	int res = 0;
 	struct ast_conference *conf;
 	int count;
@@ -2501,13 +2500,9 @@
 		ast_log(LOG_WARNING, "MeetMeCount requires an argument (conference number)\n");
 		return -1;
 	}
-
-	u = ast_module_user_add(chan);
 	
-	if (!(localdata = ast_strdupa(data))) {
-		ast_module_user_remove(u);
+	if (!(localdata = ast_strdupa(data)))
 		return -1;
-	}
 
 	AST_STANDARD_APP_ARGS(args, localdata);
 	
@@ -2529,7 +2524,6 @@
 			ast_answer(chan);
 		res = ast_say_number(chan, count, "", chan->language, (char *) NULL); /* Needs gender */
 	}
-	ast_module_user_remove(u);
 
 	return res;
 }
@@ -2538,7 +2532,6 @@
 static int conf_exec(struct ast_channel *chan, void *data)
 {
 	int res=-1;
-	struct ast_module_user *u;
 	char confno[MAX_CONFNUM] = "";
 	int allowretry = 0;
 	int retrycnt = 0;
@@ -2554,8 +2547,6 @@
 		AST_APP_ARG(pin);
 	);
 	char *optargs[OPT_ARG_ARRAY_SIZE] = { NULL, };
-
-	u = ast_module_user_add(chan);
 
 	if (ast_strlen_zero(data)) {
 		allowretry = 1;
@@ -2777,8 +2768,6 @@
 
 	if (cnf)
 		dispose_conf(cnf);
-
-	ast_module_user_remove(u);
 	
 	return res;
 }
@@ -2804,7 +2793,6 @@
 	char *params;
 	struct ast_conference *cnf;
 	struct ast_conf_user *user = NULL;
-	struct ast_module_user *u;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(confno);
 		AST_APP_ARG(command);
@@ -2816,14 +2804,11 @@
 		return -1;
 	}
 
-	u = ast_module_user_add(chan);
-
 	params = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, params);
 
 	if (!args.command) {
 		ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -2836,7 +2821,6 @@
 	if (!cnf) {
 		ast_log(LOG_WARNING, "Conference number '%s' not found!\n", args.confno);

[... 2756 lines stripped ...]



More information about the asterisk-commits mailing list