fix typo with some flags related to jingle
This commit is contained in:
parent
628b4048d9
commit
ecc4b52d4a
|
@ -786,19 +786,19 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
|
||||||
|
|
||||||
|
|
||||||
if (packet->header.type == SWITCH_STUN_BINDING_ERROR_RESPONSE) {
|
if (packet->header.type == SWITCH_STUN_BINDING_ERROR_RESPONSE) {
|
||||||
|
if ((ice->type & ICE_VANILLA)) {
|
||||||
if (ice->flips < 4) {
|
if (ice->flips < 4) {
|
||||||
if ((ice->type & ICE_CONTROLLED)) {
|
if ((ice->type & ICE_CONTROLLED)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Changing role to CONTROLLING\n");
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Changing role to CONTROLLING\n");
|
||||||
ice->type &= ~ICE_CONTROLLED;
|
ice->type &= ~ICE_CONTROLLED;
|
||||||
ice->flips++;
|
ice->flips++;
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Changing role to CONTROLLED\n");
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "Changing role to CONTROLLED\n");
|
||||||
ice->type |= ICE_CONTROLLED;
|
ice->type |= ICE_CONTROLLED;
|
||||||
ice->flips++;
|
ice->flips++;
|
||||||
|
}
|
||||||
|
packet->header.type = SWITCH_STUN_BINDING_RESPONSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
packet->header.type = SWITCH_STUN_BINDING_RESPONSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -840,10 +840,10 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
|
||||||
xlen += 4 + switch_stun_attribute_padded_length(attr);
|
xlen += 4 + switch_stun_attribute_padded_length(attr);
|
||||||
} while (xlen <= packet->header.length);
|
} while (xlen <= packet->header.length);
|
||||||
|
|
||||||
if (ice->type == ICE_GOOGLE_JINGLE && ok) {
|
if ((ice->type && ICE_GOOGLE_JINGLE) && ok) {
|
||||||
ok = !strcmp(ice->user_ice, username);
|
ok = !strcmp(ice->user_ice, username);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ice->type & ICE_VANILLA)) {
|
if ((ice->type & ICE_VANILLA)) {
|
||||||
char foo1[13] = "", foo2[13] = "";
|
char foo1[13] = "", foo2[13] = "";
|
||||||
if (!ok) ok = !strncmp(packet->header.id, ice->last_sent_id, 12);
|
if (!ok) ok = !strncmp(packet->header.id, ice->last_sent_id, 12);
|
||||||
|
@ -997,7 +997,7 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
|
||||||
memset(stunbuf, 0, sizeof(stunbuf));
|
memset(stunbuf, 0, sizeof(stunbuf));
|
||||||
rpacket = switch_stun_packet_build_header(SWITCH_STUN_BINDING_RESPONSE, packet->header.id, stunbuf);
|
rpacket = switch_stun_packet_build_header(SWITCH_STUN_BINDING_RESPONSE, packet->header.id, stunbuf);
|
||||||
|
|
||||||
if (ice->type == ICE_GOOGLE_JINGLE) {
|
if ((ice->type && ICE_GOOGLE_JINGLE)) {
|
||||||
switch_stun_packet_attribute_add_username(rpacket, username, (uint16_t)strlen(username));
|
switch_stun_packet_attribute_add_username(rpacket, username, (uint16_t)strlen(username));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue