[asterisk-commits] branch rizzo/base r9689 - in /team/rizzo/base: apps/ funcs/ include/asterisk/...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Feb 12 08:45:31 MST 2006


Author: rizzo
Date: Sun Feb 12 09:45:26 2006
New Revision: 9689

URL: http://svn.digium.com/view/asterisk?rev=9689&view=rev
Log:
remove LOCAL_USER_ACF_ADD and replace with LOCAL_USER_ADD
now that they are the same thing


Modified:
    team/rizzo/base/apps/app_hasnewvoicemail.c
    team/rizzo/base/apps/app_queue.c
    team/rizzo/base/funcs/func_cut.c
    team/rizzo/base/funcs/func_enum.c
    team/rizzo/base/funcs/func_rand.c
    team/rizzo/base/include/asterisk/module.h
    team/rizzo/base/pbx/pbx_dundi.c

Modified: team/rizzo/base/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/apps/app_hasnewvoicemail.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/apps/app_hasnewvoicemail.c (original)
+++ team/rizzo/base/apps/app_hasnewvoicemail.c Sun Feb 12 09:45:26 2006
@@ -187,7 +187,7 @@
 		AST_APP_ARG(folder);
 	);
 
-	LOCAL_USER_ACF_ADD(u);
+	LOCAL_USER_ADD(u);
 
 	buf[0] = '\0';
 

Modified: team/rizzo/base/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/apps/app_queue.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/apps/app_queue.c (original)
+++ team/rizzo/base/apps/app_queue.c Sun Feb 12 09:45:26 2006
@@ -3107,7 +3107,7 @@
 		return -1;
 	}
 
-	LOCAL_USER_ACF_ADD(lu);
+	LOCAL_USER_ADD(lu);
 	
 	AST_LIST_LOCK(&queues);
 
@@ -3150,7 +3150,7 @@
 		return -1;
 	}
 	
-	LOCAL_USER_ACF_ADD(u);
+	LOCAL_USER_ADD(u);
 
 	AST_LIST_LOCK(&queues);
 

Modified: team/rizzo/base/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/funcs/func_cut.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/funcs/func_cut.c (original)
+++ team/rizzo/base/funcs/func_cut.c Sun Feb 12 09:45:26 2006
@@ -233,7 +233,7 @@
 	struct localuser *u;
 	int ret = -1;
 
-	LOCAL_USER_ACF_ADD(u);
+	LOCAL_USER_ADD(u);
 
 	switch (sort_internal(chan, data, buf, len)) {
 	case ERROR_NOARG:
@@ -258,7 +258,7 @@
 	int ret = -1;
 	struct localuser *u;
 
-	LOCAL_USER_ACF_ADD(u);
+	LOCAL_USER_ADD(u);
 
 	switch (cut_internal(chan, data, buf, len)) {
 	case ERROR_NOARG:

Modified: team/rizzo/base/funcs/func_enum.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/funcs/func_enum.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/funcs/func_enum.c (original)
+++ team/rizzo/base/funcs/func_enum.c Sun Feb 12 09:45:26 2006
@@ -99,7 +99,7 @@
 	}
 	*p = '\0';
 
-	LOCAL_USER_ACF_ADD(u);
+	LOCAL_USER_ADD(u);
 
 	res = ast_get_enum(chan, p, dest, sizeof(dest), tech, sizeof(tech), args.zone,
 			   args.options);
@@ -141,13 +141,13 @@
 
 	buf[0] = '\0';
 
-	LOCAL_USER_ACF_ADD(u);
 
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "TXTCIDNAME requires an argument (number)\n");
-		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
+
+	LOCAL_USER_ADD(u);
 
 	res = ast_get_txt(chan, data, dest, sizeof(dest), tech, sizeof(tech), txt,
 			  sizeof(txt));

Modified: team/rizzo/base/funcs/func_rand.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/funcs/func_rand.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/funcs/func_rand.c (original)
+++ team/rizzo/base/funcs/func_rand.c Sun Feb 12 09:45:26 2006
@@ -53,7 +53,7 @@
 			     AST_APP_ARG(max);
 	);
 
-	LOCAL_USER_ACF_ADD(u);
+	LOCAL_USER_ADD(u);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/rizzo/base/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/include/asterisk/module.h?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/include/asterisk/module.h (original)
+++ team/rizzo/base/include/asterisk/module.h Sun Feb 12 09:45:26 2006
@@ -347,14 +347,11 @@
  * \note This function dynamically allocates memory.  If this operation fails
  * it will cause your function to return -1 to the caller.
  */
-#define __LU_ADD(u, ret) do {			\
+#define LOCAL_USER_ADD(u) do {			\
 	u = ast_localuser_add(&me, chan);	\
 	if (!u)					\
-		return ret;			\
+		return -1;			\
 	} while (0)
-
-#define	LOCAL_USER_ADD(u)	__LU_ADD(u, -1)
-#define	LOCAL_USER_ACF_ADD(u)	__LU_ADD(u, -1)
 
 /*! 
  * \brief Remove a localuser.

Modified: team/rizzo/base/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/base/pbx/pbx_dundi.c?rev=9689&r1=9688&r2=9689&view=diff
==============================================================================
--- team/rizzo/base/pbx/pbx_dundi.c (original)
+++ team/rizzo/base/pbx/pbx_dundi.c Sun Feb 12 09:45:26 2006
@@ -3842,15 +3842,15 @@
 	struct localuser *u;
 	struct dundi_result dr[MAX_RESULTS];
 
-	LOCAL_USER_ACF_ADD(u);
 
 	buf[0] = '\0';
 
 	if (ast_strlen_zero(num)) {
 		ast_log(LOG_WARNING, "DUNDILOOKUP requires an argument (number)\n");
-		LOCAL_USER_REMOVE(u);
 		return -1;
 	}
+
+	LOCAL_USER_ADD(u);
 
 	context = strchr(num, '|');
 	if (context) {



More information about the asterisk-commits mailing list