aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-21 22:25:55 +0000
committerautomerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-21 22:25:55 +0000
commit04f3b6a08cc47e2db2e5f8198c4649223c386de8 (patch)
tree552dc2321de9d4f66bbdb321001c423b6d788f37
parent82af5a21fb00e9b3429a9cc4219f4b39a39f09b0 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@70946 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_voicemail.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ce6cad0bf..e4dcce86f 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5179,7 +5179,11 @@ static int vm_execmain(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
int gain;
- if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
+ if (ast_strlen_zero(opts[OPT_ARG_RECORDGAIN])) {
+ ast_log(LOG_WARNING, "No value provided for record gain option\n");
+ LOCAL_USER_REMOVE(u);
+ return -1;
+ } else if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
LOCAL_USER_REMOVE(u);
return -1;