mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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/branches/1.2@71288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
6
db.c
6
db.c
@@ -531,12 +531,8 @@ static int manager_dbput(struct mansession *s, struct message *m)
|
||||
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 {
|
||||
|
@@ -692,11 +692,6 @@ static int action_setvar(struct mansession *s, struct message *m)
|
||||
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 @@ static int action_setvar(struct mansession *s, struct message *m)
|
||||
}
|
||||
}
|
||||
|
||||
pbx_builtin_setvar_helper(c, varname, varval);
|
||||
pbx_builtin_setvar_helper(c, varname, varval ? varval : "");
|
||||
|
||||
if (c)
|
||||
ast_mutex_unlock(&c->lock);
|
||||
|
Reference in New Issue
Block a user