mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 12:38:09 +00:00
stop refreshing register when network is off.
This commit is contained in:
parent
c5dc16ed5d
commit
5f32fd7e42
3 changed files with 13 additions and 0 deletions
|
|
@ -5665,6 +5665,7 @@ static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t cu
|
|||
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
|
||||
if (linphone_proxy_config_register_enabled(cfg) ) {
|
||||
if (!isReachable) {
|
||||
linphone_proxy_config_stop_refreshing(cfg);
|
||||
linphone_proxy_config_set_state(cfg, LinphoneRegistrationNone,"Registration impossible (network down)");
|
||||
}else{
|
||||
cfg->commit=TRUE;
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ const char *linphone_core_get_nat_address_resolved(LinphoneCore *lc);
|
|||
|
||||
int linphone_proxy_config_send_publish(LinphoneProxyConfig *cfg, LinphonePresenceModel *presence);
|
||||
void linphone_proxy_config_set_state(LinphoneProxyConfig *cfg, LinphoneRegistrationState rstate, const char *message);
|
||||
void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig *obj);
|
||||
void linphone_proxy_config_write_all_to_config_file(LinphoneCore *lc);
|
||||
/*
|
||||
* returns service route as defined in as defined by rfc3608, might be a list instead of just one.
|
||||
|
|
|
|||
|
|
@ -266,6 +266,17 @@ void linphone_proxy_config_apply(LinphoneProxyConfig *obj,LinphoneCore *lc){
|
|||
linphone_proxy_config_done(obj);
|
||||
}
|
||||
|
||||
void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig *obj){
|
||||
if (obj->publish_op){
|
||||
sal_op_release(obj->publish_op);
|
||||
obj->publish_op=NULL;
|
||||
}
|
||||
if (obj->op){
|
||||
sal_op_release(obj->op);
|
||||
obj->op=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
LinphoneAddress *guess_contact_for_register(LinphoneProxyConfig *obj){
|
||||
LinphoneAddress *ret=NULL;
|
||||
LinphoneAddress *proxy=linphone_address_new(obj->reg_proxy);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue