[core] Add SMBF_FIRST flag which forces media bug to front of the list. Add 'f' flag to switch_ivr_displace_session to add displace as first operation on the media stream. (#76)

This commit is contained in:
Chris Rienzo authored and Andrey Volk committed 2019-12-31 03:14:31 +04:00
1 parent 6f0ad146d2
commit 9c3f9a9a50
4 files changed
+19 -7

No files matched your search

+7 -1
View File
@@ -974,7 +974,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
session->bugs = bug;
added = 1;
}
if (!added && switch_test_flag(bug, SMBF_FIRST)) {
bug->next = session->bugs;
session->bugs = bug;
added = 1;
}
for(bp = session->bugs; bp; bp = bp->next) {
if (bp->ready && !switch_test_flag(bp, SMBF_TAP_NATIVE_READ) && !switch_test_flag(bp, SMBF_TAP_NATIVE_WRITE)) {
tap_only = 0;