]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1214163 Unchecked return value, check return value of switch_ivr_play_file and...
authorMichael Jerris <mike@jerris.com>
Thu, 15 May 2014 13:18:58 +0000 (13:18 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 15 May 2014 13:18:58 +0000 (13:18 +0000)
src/mod/applications/mod_fifo/mod_fifo.c

index b8d0ae0bc44c4feb2a6e8568726983e7d7c84878..3e707903158a7ae516e2d0c3276c673cf3f128c6 100644 (file)
@@ -3030,7 +3030,10 @@ SWITCH_STANDARD_APP(fifo_function)
                                const char *o_announce = NULL;
 
                                if ((o_announce = switch_channel_get_variable(channel, "fifo_outbound_announce"))) {
-                                       switch_ivr_play_file(session, NULL, o_announce, NULL);
+                                       status = switch_ivr_play_file(session, NULL, o_announce, NULL);
+                                       if (!SWITCH_READ_ACCEPTABLE(status)) {
+                                               break;
+                                       }
                                }
 
                                if (switch_ivr_originate(session, &other_session, &cause, url, 120, NULL, NULL, NULL, NULL, NULL, SOF_NONE, NULL) != SWITCH_STATUS_SUCCESS) {
@@ -3094,9 +3097,13 @@ SWITCH_STANDARD_APP(fifo_function)
                                }
 
                                if (announce) {
-                                       switch_ivr_play_file(session, NULL, announce, NULL);
+                                       status = switch_ivr_play_file(session, NULL, announce, NULL);
+                                       if (!SWITCH_READ_ACCEPTABLE(status)) {
+                                               break;
+                                       }
                                }
 
+
                                switch_channel_set_variable(other_channel, "fifo_serviced_by", my_id);
                                switch_channel_set_variable(other_channel, "fifo_serviced_uuid", switch_core_session_get_uuid(session));
                                switch_channel_set_flag(other_channel, CF_BREAK);
@@ -3434,7 +3441,10 @@ SWITCH_STANDARD_APP(fifo_function)
                                        memset(&args, 0, sizeof(args));
                                        args.buf = buf;
                                        args.buflen = sizeof(buf);
-                                       switch_ivr_play_file(session, NULL, fifo_consumer_wrapup_sound, &args);
+                                       status = switch_ivr_play_file(session, NULL, fifo_consumer_wrapup_sound, &args);
+                                       if (!SWITCH_READ_ACCEPTABLE(status)) {
+                                               break;
+                                       }
                                }
 
                                if (fifo_consumer_wrapup_time) {