Commit f082be37 authored by Simon Morlat's avatar Simon Morlat
Browse files

implement a better fix that really prevents double notifications of channel's listeners.

Fix link error for windows
parent 123b4209
......@@ -968,13 +968,20 @@ static void channel_invoke_state_listener(belle_sip_channel_t *obj){
static void channel_invoke_state_listener_defered(belle_sip_channel_t *obj){
static void channel_notify_error_to_listeners(belle_sip_channel_t *obj){
/* The channel may have been passed to DISCONNECTED state due to _force_close() method.
* Do not notify the error in this case, since the channel is already closed.
if (obj->state == BELLE_SIP_CHANNEL_ERROR){
static void channel_connect_next(belle_sip_channel_t *obj){
if (obj->state == BELLE_SIP_CHANNEL_RETRY){
......@@ -997,7 +1004,7 @@ static void belle_sip_channel_handle_error(belle_sip_channel_t *obj){
* it is safer to invoke the listener outside the current call stack.
* Indeed the channel encounters network errors while being called for transmiting by a transaction.
int belle_sip_channel_notify_timeout(belle_sip_channel_t *obj){
......@@ -197,7 +197,7 @@ void belle_sip_channel_force_close(belle_sip_channel_t *obj);
int belle_sip_channel_notify_timeout(belle_sip_channel_t *obj);
/*Used by transaction layer to report a server having internal errors, so that we can retry with another IP (in case of DNS SRV)*/
void belle_sip_channel_notify_server_error(belle_sip_channel_t *obj);
BELLESIP_INTERNAL_EXPORT void belle_sip_channel_notify_server_error(belle_sip_channel_t *obj);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment