diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-07-18 20:41:02 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-07-18 20:41:02 +0000 |
commit | 6a80af637cf7bc4c8f8ff0ea31b2c2b6d788223a (patch) | |
tree | 778c075b0bc4aa7fcf71c134df68cbca518ef6e4 | |
parent | b5a207c6bebce1346155cc7d3dfa12cce7fcc518 (diff) |
Fix trunk devmode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/manager.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/main/manager.c b/main/manager.c index a6f1b2bac..5d8e25b95 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1270,7 +1270,7 @@ static enum error_type handle_updates(struct mansession *s, const struct message { int x; char hdr[40]; - const char *action, *cat, *match, *line; + const char *action, *cat, *match, *line, *tmp; char *var, *value; struct ast_category *category; struct ast_variable *v; @@ -1285,11 +1285,19 @@ static enum error_type handle_updates(struct mansession *s, const struct message snprintf(hdr, sizeof(hdr), "Cat-%06d", x); cat = astman_get_header(m, hdr); snprintf(hdr, sizeof(hdr), "Var-%06d", x); - var = astman_get_header(m, hdr); - ast_uri_decode(var); + if ((tmp = astman_get_header(m, hdr))) { + var = ast_strdupa(tmp); + ast_uri_decode(var); + } else { + var = ""; + } snprintf(hdr, sizeof(hdr), "Value-%06d", x); - value = astman_get_header(m, hdr); - ast_uri_decode(value); + if ((tmp = astman_get_header(m, hdr))) { + value = ast_strdupa(tmp); + ast_uri_decode(value); + } else { + value = ""; + } if (!ast_strlen_zero(value) && *value == '>') { object = 1; value++; |