From bf8bc5db3c223ac8167288e9c4d72c31350f2ecb Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Fri, 17 Jun 2022 02:09:34 +0200 Subject: [PATCH] sip: origin: Only set own IP if it has changed This helps to reduce some logspam. --- plugins/sip/calls-sip-origin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c index 116eb0a..ad96139 100644 --- a/plugins/sip/calls-sip-origin.c +++ b/plugins/sip/calls-sip-origin.c @@ -480,6 +480,9 @@ sip_r_register (int status, nua_get_params (nua, TAG_ANY (), TAG_END ()); if (sip->sip_contact && sip->sip_contact->m_url && sip->sip_contact->m_url->url_host) { + if (g_strcmp0 (origin->own_ip, sip->sip_contact->m_url->url_host) == 0) + return; + g_free (origin->own_ip); origin->own_ip = g_strdup (sip->sip_contact->m_url->url_host); g_debug ("Own IP as reported by the registrar: %s", origin->own_ip);