From d37d385806df9e3b438b1492f35e1c357114c941 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 10 Jul 2014 08:53:44 -0400 Subject: [PATCH] properly handle unknown transport protocols --- daemon/call.c | 5 +---- daemon/sdp.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 747bc281c..ab4f2deb7 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1880,11 +1880,8 @@ int monologue_offer_answer(struct call_monologue *monologue, GQueue *streams, * offerer or WAS sent to the answerer. */ /* deduct protocol from stream parameters received */ - if (!other_media->protocol) { + if (!other_media->protocol) other_media->protocol = sp->protocol; - if (!other_media->protocol) - other_media->protocol = &transport_protocols[PROTO_RTP_AVP]; - } /* allow override of outgoing protocol even if we know it already */ if (flags && flags->transport_protocol) media->protocol = flags->transport_protocol; diff --git a/daemon/sdp.c b/daemon/sdp.c index 3dc2463ea..5bb072a69 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -1174,7 +1174,7 @@ static int replace_transport_protocol(struct sdp_chopper *chop, str *tp = &media->transport; if (!cm->protocol) - return 0; /* XXX correct? or give warning? */ + return 0; if (copy_up_to(chop, tp)) return -1;