From 9e73b3402bcef27df12630f1a63f5a0ff5f2d666 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Wed, 11 Oct 2017 15:30:17 +0200 Subject: [PATCH] fix sync between op and proxy_config contact_address --- coreapi/proxy.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index da1d83afd..856a850d9 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -1431,6 +1431,15 @@ uint8_t linphone_proxy_config_get_avpf_rr_interval(const LinphoneProxyConfig *cf } const LinphoneAddress *linphone_proxy_config_get_contact (const LinphoneProxyConfig *cfg) { + // Workaround for wrapping. + if (cfg->contact_address) + linphone_address_unref(cfg->contact_address); + + // Warning : Do not remove, the op can change its contact_address + char *buf = sal_address_as_string(cfg->op->get_contact_address()); + const_cast(cfg)->contact_address = linphone_address_new(buf); + ms_free(buf); + return cfg->contact_address; }