Skip to content

Commit

Permalink
media_exchange: fix resume when other participant is on hold
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Mar 6, 2020
1 parent c906c3c commit 7e78994
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/media_exchange/media_utils.c
Expand Up @@ -126,6 +126,7 @@ static int media_session_leg_end(struct media_session_leg *msl, int nohold)
{
int ret = 0;
str *body = NULL;
struct media_session_leg *omsl;

/* end the leg towards media server */
if (media_session_b2b_end(msl) < 0)
Expand All @@ -136,9 +137,10 @@ static int media_session_leg_end(struct media_session_leg *msl, int nohold)
if (!nohold) {
/* we need to put on hold the leg, if there's a different
* media session going on on the other leg */
if (media_session_other_leg(msl)) {
body = media_session_get_hold_sdp(msl);
} else if (msl->nohold) {
omsl = media_session_other_leg(msl);
if (omsl) {
body = media_session_get_hold_sdp(omsl);
} else if (!msl->nohold) {
/* there's no other session going on there - check to see if
* the other leg has been put on hold */
if (media_session_reinvite(msl, MEDIA_SESSION_DLG_OTHER_LEG(msl), NULL) < 0)
Expand Down

0 comments on commit 7e78994

Please sign in to comment.