[svn-commits] tilghman: trunk r71290 - in /trunk: ./ main/db.c main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 24 12:42:40 CDT 2007


Author: tilghman
Date: Sun Jun 24 12:42:39 2007
New Revision: 71290

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

................
r71289 | tilghman | 2007-06-24 12:39:34 -0500 (Sun, 24 Jun 2007) | 10 lines

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:
    trunk/   (props changed)
    trunk/main/db.c
    trunk/main/manager.c

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

Modified: trunk/main/db.c
URL: http://svn.digium.com/view/asterisk/trunk/main/db.c?view=diff&rev=71290&r1=71289&r2=71290
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Sun Jun 24 12:42:39 2007
@@ -538,12 +538,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, val);
+
+	res = ast_db_put(family, key, S_OR(val, ""));
 	if (res) {
 		astman_send_error(s, m, "Failed to update entry");
 	} else {

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=71290&r1=71289&r2=71290
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Sun Jun 24 12:42:39 2007
@@ -1554,11 +1554,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) {
@@ -1567,7 +1562,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 svn-commits mailing list