Commit 77d350a9 authored by Simon Morlat's avatar Simon Morlat
Browse files

stop automatically the refresher when the dialog is expired

parent 44d9246e
......@@ -18,6 +18,7 @@
#ifndef REFRESHER_HELPER_H_
#define REFRESHER_HELPER_H_
#define BELLE_SIP_REFRESHER_REUSE_EXPIRES -1
BELLE_SIP_BEGIN_DECLS
......
......@@ -94,6 +94,12 @@ static void schedule_timer(belle_sip_refresher_t* refresher) {
}
static void process_dialog_terminated(belle_sip_listener_t *user_ctx, const belle_sip_dialog_terminated_event_t *event){
belle_sip_refresher_t* refresher=(belle_sip_refresher_t*)user_ctx;
if (event->is_expired){
belle_sip_warning("Refresher [%p]: forced to stop because dialog has expired.", refresher);
belle_sip_refresher_stop_internal(refresher, 0);
}
}
static void process_io_error(belle_sip_listener_t *user_ctx, const belle_sip_io_error_event_t *event){
......
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