Commit 134a8017 authored by jehan's avatar jehan
Browse files

avoid seraching from source list when back from ml_sleep

parent 20e40860
......@@ -18,6 +18,7 @@
#ifndef REFRESHER_HELPER_H_
#define REFRESHER_HELPER_H_
#define BELLE_SIP_REFRESHER_REUSE_EXPIRES -1
typedef struct belle_sip_refresher belle_sip_refresher_t;
/**
......@@ -49,7 +50,7 @@ BELLESIP_EXPORT void belle_sip_refresher_stop(belle_sip_refresher_t* refresher);
/**
* Manually initiate a new transaction .
* @param refresher object
* @param expires -1 means value extrated from the transaction
* @param expires #BELLE_SIP_REFRESHER_REUSE_EXPIRES means value extracted from the transaction
* @return 0 if succeed
*/
BELLESIP_EXPORT int belle_sip_refresher_refresh(belle_sip_refresher_t* refresher,int expires);
......
......@@ -441,8 +441,8 @@ int belle_sip_main_loop_quit(belle_sip_main_loop_t *ml){
}
void belle_sip_main_loop_sleep(belle_sip_main_loop_t *ml, int milliseconds){
unsigned long timer_id = belle_sip_main_loop_add_timeout(ml,(belle_sip_source_func_t)belle_sip_main_loop_quit,ml,milliseconds);
belle_sip_source_t * s=belle_sip_main_loop_create_timeout(ml,(belle_sip_source_func_t)belle_sip_main_loop_quit,ml,milliseconds,"Main loop sleep timer");
belle_sip_main_loop_run(ml);
belle_sip_main_loop_cancel_source(ml,timer_id);
belle_sip_main_loop_remove_source(ml,s);
}
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