diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-24 00:37:01 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-24 00:37:01 +0000 |
commit | bfe1f283572283153401ef8ceb6a6b37d581ec95 (patch) | |
tree | 495c2a4c29d072de562ee9dccc351a91537b8d39 /main | |
parent | 1a709659e70741c5eac1329e39263b4dac3f2299 (diff) |
Fixes segfault in parking, patch submitted by bmd.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@118176 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/features.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/features.c b/main/features.c index 7b2d54726..1f2419d30 100644 --- a/main/features.c +++ b/main/features.c @@ -2601,7 +2601,7 @@ static int park_call_exec(struct ast_channel *chan, void *data) lot context eventually */ int res = 0; - char *parse; + char *parse = NULL; AST_DECLARE_APP_ARGS(app_args, AST_APP_ARG(timeout); AST_APP_ARG(return_con); @@ -2637,7 +2637,7 @@ static int park_call_exec(struct ast_channel *chan, void *data) }; struct ast_flags flags = { 0 }; - if (!ast_strlen_zero(app_args.timeout)) { + if (parse && !ast_strlen_zero(app_args.timeout)) { if (sscanf(app_args.timeout, "%d", &args.timeout) != 1) { ast_log(LOG_WARNING, "Invalid timeout '%s' provided\n", app_args.timeout); args.timeout = 0; @@ -2646,7 +2646,7 @@ static int park_call_exec(struct ast_channel *chan, void *data) args.return_con = app_args.return_con; args.return_ext = app_args.return_ext; - if (!ast_strlen_zero(app_args.return_pri)) { + if (parse && !ast_strlen_zero(app_args.return_pri)) { if (sscanf(app_args.return_pri, "%d", &args.return_pri) != 1) { ast_log(LOG_WARNING, "Invalid priority '%s' specified\n", app_args.return_pri); args.return_pri = 0; |