[svn-commits] tilghman: branch 1.2 r71288 - in /branches/1.2: db.c manager.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Jun 24 12:32:21 CDT 2007
Author: tilghman
Date: Sun Jun 24 12:32:21 2007
New Revision: 71288
URL: http://svn.digium.com/view/asterisk?view=rev&rev=71288
Log:
Issue 10043 - There is a legitimate need to be able to set variables to the empty string.
Modified:
branches/1.2/db.c
branches/1.2/manager.c
Modified: branches/1.2/db.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/db.c?view=diff&rev=71288&r1=71287&r2=71288
==============================================================================
--- branches/1.2/db.c (original)
+++ branches/1.2/db.c Sun Jun 24 12:32:21 2007
@@ -531,12 +531,8 @@
astman_send_error(s, m, "No key specified");
return 0;
}
- if (!strlen(val)) {
- astman_send_error(s, m, "No val specified");
- return 0;
- }
-
- res = ast_db_put(family, key, val);
+
+ res = ast_db_put(family, key, val ? val : "");
if (res) {
astman_send_error(s, m, "Failed to update entry");
} else {
Modified: branches/1.2/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/manager.c?view=diff&rev=71288&r1=71287&r2=71288
==============================================================================
--- branches/1.2/manager.c (original)
+++ branches/1.2/manager.c Sun Jun 24 12:32:21 2007
@@ -692,11 +692,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) {
@@ -705,7 +700,7 @@
}
}
- pbx_builtin_setvar_helper(c, varname, varval);
+ pbx_builtin_setvar_helper(c, varname, varval ? varval : "");
if (c)
ast_mutex_unlock(&c->lock);
More information about the svn-commits
mailing list