summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2012-05-10 18:35:14 +0000
committerJonathan Rose <jrose@digium.com>2012-05-10 18:35:14 +0000
commit8227f70cd70f497cb03c1f9aab63950bcd979d8b (patch)
tree4f4587c0997f7a2d7ad8c6ecc89c3ad2971d5027 /apps/app_voicemail.c
parent3430da58e9f168e608e46133225e0fc81589f6ef (diff)
Coverity Report: Fix issues for error type CHECKED_RETURN for core
(issue ASTERISK-19658) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1905/ ........ Merged revisions 366094 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366106 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 55aec5d22..d4da42b03 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6983,7 +6983,10 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
strncat(vms->introfn, "intro", sizeof(vms->introfn));
ast_play_and_wait(chan, INTRO);
ast_play_and_wait(chan, "beep");
- play_record_review(chan, NULL, vms->introfn, vmu->maxsecs, vm_fmts, 1, vmu, (int *) duration, NULL, NULL, record_gain, vms, flag);
+ cmd = play_record_review(chan, NULL, vms->introfn, vmu->maxsecs, vm_fmts, 1, vmu, (int *) duration, NULL, NULL, record_gain, vms, flag);
+ if (cmd == -1) {
+ break;
+ }
cmd = 't';
#else
@@ -9561,7 +9564,10 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
retries = 0;
RETRIEVE(prefile, -1, vmu->mailbox, vmu->context);
if (ast_fileexists(prefile, NULL, NULL) <= 0) {
- play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, NULL, record_gain, vms, NULL);
+ cmd = play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, NULL, record_gain, vms, NULL);
+ if (cmd == -1) {
+ break;
+ }
cmd = 't';
} else {
switch (cmd) {
@@ -11762,6 +11768,7 @@ static void mwi_sub_event_cb(const struct ast_event *event, void *userdata)
static void start_poll_thread(void)
{
+ int errcode;
mwi_sub_sub = ast_event_subscribe(AST_EVENT_SUB, mwi_sub_event_cb, "Voicemail MWI subscription", NULL,
AST_EVENT_IE_EVENTTYPE, AST_EVENT_IE_PLTYPE_UINT, AST_EVENT_MWI,
AST_EVENT_IE_END);
@@ -11775,7 +11782,9 @@ static void start_poll_thread(void)
poll_thread_run = 1;
- ast_pthread_create(&poll_thread, NULL, mb_poll_thread, NULL);
+ if ((errcode = ast_pthread_create(&poll_thread, NULL, mb_poll_thread, NULL))) {
+ ast_log(LOG_ERROR, "Could not create thread: %s\n", strerror(errcode));
+ }
}
static void stop_poll_thread(void)