[asterisk-commits] tilghman: branch 1.4 r71289 - in /branches/1.4: ./ main/db.c main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 24 12:39:34 CDT 2007


Author: tilghman
Date: Sun Jun 24 12:39:34 2007
New Revision: 71289

URL: http://svn.digium.com/view/asterisk?view=rev&rev=71289
Log:
Merged revisions 71288 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r71288 | tilghman | 2007-06-24 12:32:21 -0500 (Sun, 24 Jun 2007) | 2 lines

Issue 10043 - There is a legitimate need to be able to set variables to the empty string.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/main/db.c
    branches/1.4/main/manager.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/main/db.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/db.c?view=diff&rev=71289&r1=71288&r2=71289
==============================================================================
--- branches/1.4/main/db.c (original)
+++ branches/1.4/main/db.c Sun Jun 24 12:39:34 2007
@@ -534,12 +534,8 @@
 		astman_send_error(s, m, "No key specified");
 		return 0;
 	}
-	if (ast_strlen_zero(val)) {
-		astman_send_error(s, m, "No val specified");
-		return 0;
-	}
-
-	res = ast_db_put(family, key, (char *) val);
+
+	res = ast_db_put(family, key, (char *) S_OR(val, ""));
 	if (res) {
 		astman_send_error(s, m, "Failed to update entry");
 	} else {

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/manager.c?view=diff&rev=71289&r1=71288&r2=71289
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Sun Jun 24 12:39:34 2007
@@ -1372,11 +1372,6 @@
 		return 0;
 	}
 	
-	if (ast_strlen_zero(varval)) {
-		astman_send_error(s, m, "No value specified");
-		return 0;
-	}
-
 	if (!ast_strlen_zero(name)) {
 		c = ast_get_channel_by_name_locked(name);
 		if (!c) {
@@ -1385,7 +1380,7 @@
 		}
 	}
 	
-	pbx_builtin_setvar_helper(c, varname, varval);
+	pbx_builtin_setvar_helper(c, varname, S_OR(varval, ""));
 	  
 	if (c)
 		ast_channel_unlock(c);




More information about the asterisk-commits mailing list