Commit 22011311 authored by Mickaël Turnel's avatar Mickaël Turnel
Browse files

Add a parameter reconnect_to_promary_asap in belle_sip_stack

parent c805efca
......@@ -171,6 +171,23 @@ BELLESIP_EXPORT void belle_sip_stack_set_http_proxy_port(belle_sip_stack_t *stac
BELLESIP_EXPORT const char *belle_sip_stack_get_http_proxy_host(const belle_sip_stack_t *stack);
BELLESIP_EXPORT int belle_sip_stack_get_http_proxy_port(const belle_sip_stack_t *stack);
* Enable the reconnection to the primary server when it is up again as soon as possible.
* When activated, instead of closing if the current server is not in the refreshed priority ordered servers' list
* the bellesip channel will close if the current server is not the first server of this list.
* As a result, it will try to reconnect to the server with the highest priority if it is not the case when records
* are expiring.
* @param prov
* @param enabled 0 to disable
BELLESIP_EXPORT void belle_sip_stack_enable_reconnect_to_primary_asap(belle_sip_stack_t *stack, int enabled);
* Returns if the reconnection to the primary server is enabled.
* @param prov
* @see belle_sip_provider_enable_reconnect_to_primary_asap()
BELLESIP_EXPORT int belle_sip_stack_reconnect_to_primary_asap_enabled(const belle_sip_stack_t *stack);
......@@ -549,6 +549,7 @@ struct belle_sip_stack{
unsigned char dns_srv_enabled;
unsigned char dns_search_enabled;
unsigned char reconnect_to_primary_asap;
BELLESIP_EXPORT belle_sip_hop_t* belle_sip_hop_new(const char* transport, const char *cname, const char* host,int port);
......@@ -319,3 +319,11 @@ GET_SET_INT(belle_sip_stack,http_proxy_port, int)
void belle_sip_set_log_handler(belle_sip_log_function_t func) {
bctbx_set_log_handler_for_domain(func, BCTBX_LOG_DOMAIN);
void belle_sip_stack_enable_reconnect_to_primary_asap(belle_sip_stack_t *stack, int enabled) {
int belle_sip_stack_reconnect_to_primary_asap_enabled(const belle_sip_stack_t *stack) {
return stack->reconnect_to_primary_asap;
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