|
|
|
@ -1439,7 +1439,7 @@ static int __init_streams(struct call_media *A, struct call_media *B, const stru |
|
|
|
} |
|
|
|
|
|
|
|
static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *this, |
|
|
|
struct call_media *other) |
|
|
|
struct call_media *other, bool ice_restart) |
|
|
|
{ |
|
|
|
if (!flags) |
|
|
|
return; |
|
|
|
@ -1531,7 +1531,7 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi |
|
|
|
/* ICE_CONTROLLING is from our POV, the other ICE flags are from peer's POV */ |
|
|
|
if (MEDIA_ISSET(this, ICE_LITE_PEER) && !MEDIA_ISSET(this, ICE_LITE_SELF)) |
|
|
|
MEDIA_SET(this, ICE_CONTROLLING); |
|
|
|
else if (!MEDIA_ISSET(this, INITIALIZED)) { |
|
|
|
else if (!MEDIA_ISSET(this, INITIALIZED) || ice_restart) { |
|
|
|
if (MEDIA_ISSET(this, ICE_LITE_SELF)) |
|
|
|
MEDIA_CLEAR(this, ICE_CONTROLLING); |
|
|
|
else if (flags->opmode == OP_OFFER) |
|
|
|
@ -1544,7 +1544,7 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi |
|
|
|
/* roles are reversed for the other side */ |
|
|
|
if (MEDIA_ISSET(other, ICE_LITE_PEER) && !MEDIA_ISSET(other, ICE_LITE_SELF)) |
|
|
|
MEDIA_SET(other, ICE_CONTROLLING); |
|
|
|
else if (!MEDIA_ISSET(other, INITIALIZED)) { |
|
|
|
else if (!MEDIA_ISSET(other, INITIALIZED) || ice_restart) { |
|
|
|
if (MEDIA_ISSET(other, ICE_LITE_SELF)) |
|
|
|
MEDIA_CLEAR(other, ICE_CONTROLLING); |
|
|
|
else if (flags->opmode == OP_OFFER) |
|
|
|
@ -2722,7 +2722,7 @@ int monologue_offer_answer(struct call_monologue *dialogue[2], GQueue *streams, |
|
|
|
} |
|
|
|
|
|
|
|
/* ICE stuff - must come after interface and address family selection */ |
|
|
|
__ice_offer(flags, media, other_media); |
|
|
|
__ice_offer(flags, media, other_media, ice_is_restart(other_media->ice_agent, sp)); |
|
|
|
|
|
|
|
|
|
|
|
/* we now know what's being advertised by the other side */ |
|
|
|
@ -2912,7 +2912,7 @@ int monologue_publish(struct call_monologue *ml, GQueue *streams, struct sdp_ng_ |
|
|
|
return -1; // XXX return error code |
|
|
|
|
|
|
|
/* ICE stuff - must come after interface and address family selection */ |
|
|
|
__ice_offer(flags, media, media); |
|
|
|
__ice_offer(flags, media, media, ice_is_restart(media->ice_agent, sp)); |
|
|
|
|
|
|
|
MEDIA_SET(media, INITIALIZED); |
|
|
|
|
|
|
|
@ -2982,7 +2982,7 @@ static int monologue_subscribe_request1(struct call_monologue *src_ml, struct ca |
|
|
|
if (dst_media->logical_intf == NULL) |
|
|
|
return -1; // XXX return error code |
|
|
|
|
|
|
|
__ice_offer(flags, dst_media, src_media); |
|
|
|
__ice_offer(flags, dst_media, src_media, ice_is_restart(src_media->ice_agent, sp)); |
|
|
|
|
|
|
|
struct endpoint_map *em = __get_endpoint_map(dst_media, sp->num_ports, NULL, flags, true); |
|
|
|
if (!em) |
|
|
|
|