Browse Source

TT#101201 fix ICE-lite mode switch

Change-Id: I10689bc07b86984880bfd420d6be4fbb057c41d1
pull/1218/head
Richard Fuchs 5 years ago
parent
commit
def813cfde
2 changed files with 25 additions and 20 deletions
  1. +22
    -18
      daemon/call.c
  2. +3
    -2
      include/call_interfaces.h

+ 22
- 18
daemon/call.c View File

@ -1310,24 +1310,28 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi
}
}
switch (flags->ice_lite_option) {
case ICE_LITE_OFF:
MEDIA_CLEAR(this, ICE_LITE_SELF);
MEDIA_CLEAR(other, ICE_LITE_SELF);
break;
case ICE_LITE_FWD:
MEDIA_SET(this, ICE_LITE_SELF);
MEDIA_CLEAR(other, ICE_LITE_SELF);
break;
case ICE_LITE_BKW:
MEDIA_CLEAR(this, ICE_LITE_SELF);
MEDIA_SET(other, ICE_LITE_SELF);
break;
case ICE_LITE_BOTH:
MEDIA_SET(this, ICE_LITE_SELF);
MEDIA_SET(other, ICE_LITE_SELF);
break;
};
if (flags->opmode == OP_OFFER) {
switch (flags->ice_lite_option) {
case ICE_LITE_OFF:
MEDIA_CLEAR(this, ICE_LITE_SELF);
MEDIA_CLEAR(other, ICE_LITE_SELF);
break;
case ICE_LITE_FWD:
MEDIA_SET(this, ICE_LITE_SELF);
MEDIA_CLEAR(other, ICE_LITE_SELF);
break;
case ICE_LITE_BKW:
MEDIA_CLEAR(this, ICE_LITE_SELF);
MEDIA_SET(other, ICE_LITE_SELF);
break;
case ICE_LITE_BOTH:
MEDIA_SET(this, ICE_LITE_SELF);
MEDIA_SET(other, ICE_LITE_SELF);
break;
default:
break;
}
}
/* determine roles (even if we don't actually do ICE) */
/* this = receiver, other = sender */


+ 3
- 2
include/call_interfaces.h View File

@ -58,11 +58,12 @@ struct sdp_ng_flags {
ICE_OPTIONAL,
} ice_option:3;
enum {
ICE_LITE_OFF = 0,
ICE_LITE_DEFAULT = 0,
ICE_LITE_OFF,
ICE_LITE_FWD,
ICE_LITE_BKW,
ICE_LITE_BOTH,
} ice_lite_option:2;
} ice_lite_option:3;
unsigned int asymmetric:1,
protocol_accept:1,
no_redis_update:1,


Loading…
Cancel
Save