Fix issue on TURN/UDP (endless connection checking)

This commit is contained in:
bossiel 2014-11-14 00:27:21 +00:00
parent cd4b500e0d
commit 61017d82f5
2 changed files with 4 additions and 4 deletions

View File

@ -1823,7 +1823,7 @@ start_conneck:
else if(ret == 0) {
// timeout
// TSK_DEBUG_INFO("STUN request timedout");
continue;
goto check_nomination; //!\ continue == possible endless loop
}
else if(ret > 0) {
// there is data to read
@ -1898,7 +1898,7 @@ check_nomination:
if(self->have_nominated_offer && self->have_nominated_answer){
self->have_nominated_symetric = tnet_ice_pairs_have_nominated_symetric(self->candidates_pairs, check_rtcp);
}
}
} // while (self->is_started...
// "ret" could be "<>0" if last function used was "select()", "recvfrom()", "ioctlt()"...this is why we set the value to #0.
// if there was an error then, we'll jump to "bail:" and next code is skipped

View File

@ -70,8 +70,8 @@ TINYNET_API int tnet_ice_ctx_add_server(
tnet_ice_ctx_add_server((self), (transport_proto), (server_addr), (server_port), tsk_false/*use_turn*/, tsk_true/*use_stun*/, (username), (password))
TINYNET_API int tnet_ice_ctx_set_sync_mode(struct tnet_ice_ctx_s* self, tsk_bool_t sync_mode);
TINYNET_API int tnet_ice_ctx_set_silent_mode(struct tnet_ice_ctx_s* self, tsk_bool_t silent_mode);
TNET_DEPRECATED(TINYNET_API int tnet_ice_ctx_set_stun_enabled(struct tnet_ice_ctx_s* self, tsk_bool_t stun_enabled));
TNET_DEPRECATED(TINYNET_API int tnet_ice_ctx_set_turn_enabled(struct tnet_ice_ctx_s* self, tsk_bool_t turn_enabled));
TINYNET_API int tnet_ice_ctx_set_stun_enabled(struct tnet_ice_ctx_s* self, tsk_bool_t stun_enabled);
TINYNET_API int tnet_ice_ctx_set_turn_enabled(struct tnet_ice_ctx_s* self, tsk_bool_t turn_enabled);
TINYNET_API int tnet_ice_ctx_start(struct tnet_ice_ctx_s* self);
TINYNET_API int tnet_ice_ctx_rtp_callback(struct tnet_ice_ctx_s* self, tnet_ice_rtp_callback_f rtp_callback, const void* rtp_callback_data);
TINYNET_API int tnet_ice_ctx_set_concheck_timeout(struct tnet_ice_ctx_s* self, int64_t timeout);