aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-01 22:29:54 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-01 22:29:54 +0000
commit41e917d31719206b58fa20beebe21d92ecee04fb (patch)
treec6941c6b9fea215d17f0729b06f4b527eae2ff3c /apps/app_voicemail.c
parent0c32d6ad41438565256c47ad98f08554ceaa4ddd (diff)
Further minor fixup
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2849 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-xapps/app_voicemail.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6d14042fd..706cdd9e2 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1033,8 +1033,10 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco
char prependfile[80];
/* barf if no pointer passed to store duration in */
- if (duration == NULL)
+ if (duration == NULL) {
ast_log(LOG_WARNING, "Error play_and_prepend called without duration pointer\n");
+ return -1;
+ }
ast_log(LOG_DEBUG,"play_and_prepend: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
@@ -1252,8 +1254,10 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor
int rfmt=0;
/* barf if no pointer passed to store duration in */
- if (duration == NULL)
+ if (duration == NULL) {
ast_log(LOG_WARNING, "Error play_and_record called without duration pointer\n");
+ return -1;
+ }
ast_log(LOG_DEBUG,"play_and_record: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt);
snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name);
@@ -2445,7 +2449,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
snprintf(callerid, sizeof(callerid), "FWD from: %s from %s", sender->fullname, ast_variable_retrieve(mif, NULL, "callerid"));
s = ast_variable_retrieve(mif, NULL, "duration");
if (s)
- duration = atol(s);
+ duration = atoi(s);
else
duration = 0;
if (strlen(vmtmp->email)) {
@@ -4130,8 +4134,10 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
/* Note that urgent and private are for flagging messages as such in the future */
/* barf if no pointer passed to store duration in */
- if (duration == NULL)
+ if (duration == NULL) {
ast_log(LOG_WARNING, "Error play_record_review called without duration pointer\n");
+ return -1;
+ }
cmd = '3'; /* Want to start by recording */