[asterisk-addons-commits] file: trunk r534 - /trunk/apps/

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Wed Feb 20 16:52:15 CST 2008


Author: file
Date: Wed Feb 20 16:52:14 2008
New Revision: 534

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=534
Log:
Applications no longer need to keep track of their usage, it is done by the PBX core.

Modified:
    trunk/apps/app_addon_sql_mysql.c
    trunk/apps/app_fax.c
    trunk/apps/app_saycountpl.c

Modified: trunk/apps/app_addon_sql_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/apps/app_addon_sql_mysql.c?view=diff&rev=534&r1=533&r2=534
==============================================================================
--- trunk/apps/app_addon_sql_mysql.c (original)
+++ trunk/apps/app_addon_sql_mysql.c Wed Feb 20 16:52:14 2008
@@ -447,7 +447,6 @@
 
 static int MYSQL_exec(struct ast_channel *chan, void *data)
 {
-	struct ast_module_user *u;
 	int result;
 	char sresult[10];
 
@@ -458,7 +457,6 @@
 		return -1;
 	}
 
-	u = ast_module_user_add(chan);
 	result = 0;
 
 	ast_mutex_lock(&_mysql_mutex);
@@ -484,7 +482,6 @@
 		
 	ast_mutex_unlock(&_mysql_mutex);
 
-	ast_module_user_remove(u);
 	snprintf(sresult, sizeof(sresult), "%d", result);
 	pbx_builtin_setvar_helper(chan, "MYSQL_STATUS", sresult);
 	return 0;
@@ -492,7 +489,6 @@
 
 static int unload_module(void)
 {
-	ast_module_user_hangup_all();
 	return ast_unregister_application(app);
 }
 

Modified: trunk/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/apps/app_fax.c?view=diff&rev=534&r1=533&r2=534
==============================================================================
--- trunk/apps/app_fax.c (original)
+++ trunk/apps/app_fax.c Wed Feb 20 16:52:14 2008
@@ -631,7 +631,6 @@
 	int res = 0;
 	char *parse;
 	fax_session session;
-	struct ast_module_user *u;
 
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(file_name);
@@ -661,9 +660,6 @@
 	}
 
 	/* Done parsing */
-
-	u = ast_module_user_add(chan);
-
 	session.direction = 1;
 	session.file_name = args.file_name;
 	session.chan = chan;
@@ -671,8 +667,6 @@
 
 	res = transmit(&session);
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
@@ -681,7 +675,6 @@
 	int res = 0;
 	char *parse;
 	fax_session session;
-	struct ast_module_user *u;
 
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(file_name);
@@ -711,9 +704,6 @@
 	}
 
 	/* Done parsing */
-
-	u = ast_module_user_add(chan);
-
 	session.direction = 0;
 	session.file_name = args.file_name;
 	session.chan = chan;
@@ -721,16 +711,12 @@
 
 	res = transmit(&session);
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
 static int unload_module(void)
 {
 	int res;
-
-	ast_module_user_hangup_all();
 
 	res = ast_unregister_application(app_sndfax_name);	
 	res |= ast_unregister_application(app_rcvfax_name);	

Modified: trunk/apps/app_saycountpl.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/apps/app_saycountpl.c?view=diff&rev=534&r1=533&r2=534
==============================================================================
--- trunk/apps/app_saycountpl.c (original)
+++ trunk/apps/app_saycountpl.c Wed Feb 20 16:52:14 2008
@@ -53,7 +53,6 @@
 	int res = 0;
 	char *s;
 	int inum;
-	struct ast_module_user *u;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(word1);
 		AST_APP_ARG(word2);
@@ -65,7 +64,6 @@
 		ast_log(LOG_WARNING, "SayCountPL requires 4 arguments: word-1,word-2,word-5,number\n");
 		return -1;
 	}
-	u = ast_module_user_add(chan);
 
 	s = ast_strdupa(data);
 
@@ -74,13 +72,11 @@
 	/* Check to see if params passed */
 	if (!args.word1 || !args.word2 || !args.word5 || !args.num) {
 		ast_log(LOG_WARNING, "SayCountPL requires 4 arguments: word-1,word-2,word-3,number\n");
-		ast_module_user_remove(u);
 		return -1;
 	}
 
 	if (sscanf(args.num, "%d", &inum) != 1) {
 		ast_log(LOG_WARNING, "'%s' is not a valid number\n", args.num);
-		ast_module_user_remove(u);
 		return -1;
 	}
 
@@ -88,14 +84,11 @@
 
 	res = saywords(chan, args.word1, args.word2, args.word5, inum);
 
-	ast_module_user_remove(u);
-
 	return res;
 }
 
 static int unload_module(void)
 {
-	ast_module_user_hangup_all(); 
 	return ast_unregister_application(app);
 }
 




More information about the asterisk-addons-commits mailing list