mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
Rewrite commit a858005 from master branch (Don't unregister previous contact by default. It is causing troubles with +sip.instance)
This commit is contained in:
parent
a4b0da8ad7
commit
444ec1ac9a
1 changed files with 7 additions and 11 deletions
|
|
@ -457,20 +457,16 @@ void linphone_proxy_config_apply(LinphoneProxyConfig *cfg,LinphoneCore *lc){
|
|||
|
||||
void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig * cfg){
|
||||
LinphoneAddress *contact_addr = NULL;
|
||||
{
|
||||
const SalAddress *sal_addr = cfg->op && cfg->state == LinphoneRegistrationOk
|
||||
? cfg->op->get_contact_address()
|
||||
: NULL;
|
||||
if (sal_addr) {
|
||||
char *buf = sal_address_as_string(sal_addr);
|
||||
contact_addr = buf ? linphone_address_new(buf) : NULL;
|
||||
ms_free(buf);
|
||||
}
|
||||
const SalAddress *sal_addr = cfg->op && cfg->state == LinphoneRegistrationOk ? cfg->op->get_contact_address() : NULL;
|
||||
if (sal_addr) {
|
||||
char *buf = sal_address_as_string(sal_addr);
|
||||
contact_addr = buf ? linphone_address_new(buf) : NULL;
|
||||
ms_free(buf);
|
||||
}
|
||||
|
||||
/*with udp, there is a risk of port reuse, so I prefer to not do anything for now*/
|
||||
if (contact_addr) {
|
||||
if (linphone_address_get_transport(contact_addr) != LinphoneTransportUdp) {
|
||||
if (linphone_address_get_transport(contact_addr) != LinphoneTransportUdp && lp_config_get_int(cfg->lc->config, "sip", "unregister_previous_contact", 0)) {
|
||||
if (cfg->pending_contact)
|
||||
linphone_address_unref(cfg->pending_contact);
|
||||
cfg->pending_contact=contact_addr;
|
||||
|
|
@ -1589,4 +1585,4 @@ bool_t linphone_proxy_config_is_push_notification_allowed(const LinphoneProxyCon
|
|||
|
||||
void linphone_proxy_config_set_push_notification_allowed(LinphoneProxyConfig *cfg, bool_t is_allowed) {
|
||||
cfg->push_notification_allowed = is_allowed;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue