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.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71290
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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 {
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) {
}
}
- pbx_builtin_setvar_helper(c, varname, varval);
+ pbx_builtin_setvar_helper(c, varname, S_OR(varval, ""));
if (c)
ast_channel_unlock(c);