From 97b472bfdb414f0b6674626f55eb934882e55412 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 19 Nov 2014 15:23:18 -0500 Subject: [PATCH] dont break legacy control protocols --- daemon/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index f166280fd..36c98fab0 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2164,13 +2164,13 @@ int monologue_offer_answer(struct call_monologue *other_ml, GQueue *streams, /* Special case: if this is an offer and actpass is being offered (as it should), * we would normally choose to be active. However, if this is a reinvite and we * were passive previously, we should retain this role. */ - if (flags->opmode == OP_OFFER && MEDIA_ISSET(other_media, SETUP_ACTIVE) + if (flags && flags->opmode == OP_OFFER && MEDIA_ISSET(other_media, SETUP_ACTIVE) && MEDIA_ISSET(other_media, SETUP_PASSIVE) && (tmp & (MEDIA_FLAG_SETUP_ACTIVE | MEDIA_FLAG_SETUP_PASSIVE)) == MEDIA_FLAG_SETUP_PASSIVE) MEDIA_CLEAR(other_media, SETUP_ACTIVE); /* if passive mode is requested, honour it if we can */ - if (flags->dtls_passive && MEDIA_ISSET(other_media, SETUP_PASSIVE)) + if (flags && flags->dtls_passive && MEDIA_ISSET(other_media, SETUP_PASSIVE)) MEDIA_CLEAR(other_media, SETUP_ACTIVE); if (memcmp(&other_media->fingerprint, &sp->fingerprint, sizeof(sp->fingerprint))) {