From d8c68da271c082fa881c35b241b94fbb99fb3d61 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 20 Jul 2021 10:05:03 +0200 Subject: [PATCH] TT#131500 remove already applied fixes Change-Id: I30ac3b7afdb0d6874d5bed9dc9c3c48476117ced --- debian/patches/series | 10 -- ...core-xavp-safety-checks-for-name-len.patch | 112 ------------------ ...-ignore-408-on-keepalive-with-cseq-0.patch | 28 ----- ..._pong_interval-only-for-libwebsocket.patch | 22 ---- ...elper-don-t-fail-if-a-rtcp-has-no-IP.patch | 30 ----- ...rect-type-for-local_log_facility-mod.patch | 22 ---- ...up_igp_all-instead-of-fixup_igp_null.patch | 51 -------- ...-matching-To-header-in-lw_get_hf_nam.patch | 28 ----- ...vp-and-context-modparams-to-str-null.patch | 43 ------- ...essary-periodic-db-queries-cancelled.patch | 42 ------- 10 files changed, 388 deletions(-) delete mode 100644 debian/patches/upstream/core-xavp-safety-checks-for-name-len.patch delete mode 100644 debian/patches/upstream/dialog-ignore-408-on-keepalive-with-cseq-0.patch delete mode 100644 debian/patches/upstream/lwsc-set-ws_ping_pong_interval-only-for-libwebsocket.patch delete mode 100644 debian/patches/upstream/nathelper-don-t-fail-if-a-rtcp-has-no-IP.patch delete mode 100644 debian/patches/upstream/presence-set-correct-type-for-local_log_facility-mod.patch delete mode 100644 debian/patches/upstream/tcpops-use-fixup_igp_all-instead-of-fixup_igp_null.patch delete mode 100644 debian/patches/upstream/tm-lw-parser-fix-matching-To-header-in-lw_get_hf_nam.patch delete mode 100644 debian/patches/upstream/topos-init-xavp-and-context-modparams-to-str-null.patch delete mode 100644 debian/patches/upstream/usrloc-unnecessary-periodic-db-queries-cancelled.patch diff --git a/debian/patches/series b/debian/patches/series index c447485ff..17d55066d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -35,16 +35,6 @@ sipwise/sca-add-pai_avp-parameter.patch # https://github.com/kamailio/kamailio/pull/979 # collides with our changes to pua_dialoginfo sipwise/Revert-pua_dialoginfo-disable-publish-notifications-.patch -upstream/tm-lw-parser-fix-matching-To-header-in-lw_get_hf_nam.patch -upstream/lwsc-set-ws_ping_pong_interval-only-for-libwebsocket.patch -upstream/dialog-ignore-408-on-keepalive-with-cseq-0.patch -upstream/usrloc-unnecessary-periodic-db-queries-cancelled.patch -upstream/tcpops-use-fixup_igp_all-instead-of-fixup_igp_null.patch -upstream/presence-set-correct-type-for-local_log_facility-mod.patch -upstream/core-xavp-safety-checks-for-name-len.patch -upstream/topos-init-xavp-and-context-modparams-to-str-null.patch -## usptream master -upstream/nathelper-don-t-fail-if-a-rtcp-has-no-IP.patch ### relevant for upstream sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch sipwise/pua_dialoginfo-local_identity_dlg_var.patch diff --git a/debian/patches/upstream/core-xavp-safety-checks-for-name-len.patch b/debian/patches/upstream/core-xavp-safety-checks-for-name-len.patch deleted file mode 100644 index 123125790..000000000 --- a/debian/patches/upstream/core-xavp-safety-checks-for-name-len.patch +++ /dev/null @@ -1,112 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Thu, 13 May 2021 17:41:40 +0200 -Subject: [PATCH] core: xavp - safety checks for name len - -(cherry picked from commit d22d812da1c3b2a2f65f142ef5ed5fa07e8ab072) ---- - src/core/xavp.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/core/xavp.c b/src/core/xavp.c -index b11b999..036a5ff 100644 ---- a/src/core/xavp.c -+++ b/src/core/xavp.c -@@ -106,7 +106,7 @@ static sr_xavp_t *xavp_new_value(str *name, sr_xval_t *val) - int size; - unsigned int id; - -- if(name==NULL || name->s==NULL || val==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0 || val==NULL) - return NULL; - id = get_hash1_raw(name->s, name->len); - -@@ -427,7 +427,7 @@ static int xavp_rm_internal(str *name, sr_xavp_t **head, int idx) - int n=0; - int count=0; - -- if(name==NULL || name->s==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0) - return 0; - - id = get_hash1_raw(name->s, name->len); -@@ -498,7 +498,7 @@ int xavp_count(str *name, sr_xavp_t **start) - unsigned int id; - int n = 0; - -- if(name==NULL || name->s==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0) - return -1; - id = get_hash1_raw(name->s, name->len); - -@@ -865,7 +865,7 @@ sr_xavp_t *xavp_extract(str *name, sr_xavp_t **list) - sr_xavp_t *prv = 0; - unsigned int id; - -- if(name==NULL || name->s==NULL) { -+ if(name==NULL || name->s==NULL || name->len<=0) { - if(list!=NULL) { - avp = *list; - if(avp!=NULL) { -@@ -1157,7 +1157,7 @@ static sr_xavp_t *xavu_get_internal(str *name, sr_xavp_t **list, sr_xavp_t **prv - sr_xavp_t *avu; - unsigned int id; - -- if(name==NULL || name->s==NULL) { -+ if(name==NULL || name->s==NULL || name->len<=0) { - return NULL; - } - -@@ -1235,7 +1235,7 @@ int xavu_rm_by_name(str *name, sr_xavp_t **head) - unsigned int id; - - -- if(name==NULL || name->s==NULL) { -+ if(name==NULL || name->s==NULL || name->len<=0) { - return -1; - } - -@@ -1579,7 +1579,7 @@ static sr_xavp_t *xavi_new_value(str *name, sr_xval_t *val) - int size; - unsigned int id; - -- if(name==NULL || name->s==NULL || val==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0 || val==NULL) - return NULL; - id = get_hash1_case_raw(name->s, name->len); - -@@ -1812,7 +1812,7 @@ static sr_xavp_t *xavi_get_internal(str *name, sr_xavp_t **list, int idx, sr_xav - unsigned int id; - int n = 0; - -- if(name==NULL || name->s==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0) - return NULL; - id = get_hash1_case_raw(name->s, name->len); - -@@ -1939,7 +1939,7 @@ static int xavi_rm_internal(str *name, sr_xavp_t **head, int idx) - int n=0; - int count=0; - -- if(name==NULL || name->s==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0) - return 0; - - id = get_hash1_case_raw(name->s, name->len); -@@ -2022,7 +2022,7 @@ int xavi_count(str *name, sr_xavp_t **start) - unsigned int id; - int n = 0; - -- if(name==NULL || name->s==NULL) -+ if(name==NULL || name->s==NULL || name->len<=0) - return -1; - id = get_hash1_case_raw(name->s, name->len); - -@@ -2315,7 +2315,7 @@ sr_xavp_t *xavi_extract(str *name, sr_xavp_t **list) - sr_xavp_t *prv = 0; - unsigned int id; - -- if(name==NULL || name->s==NULL) { -+ if(name==NULL || name->s==NULL || name->len<=0) { - if(list!=NULL) { - avi = *list; - if(avi!=NULL) { diff --git a/debian/patches/upstream/dialog-ignore-408-on-keepalive-with-cseq-0.patch b/debian/patches/upstream/dialog-ignore-408-on-keepalive-with-cseq-0.patch deleted file mode 100644 index d5974b009..000000000 --- a/debian/patches/upstream/dialog-ignore-408-on-keepalive-with-cseq-0.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Thu, 6 May 2021 12:27:05 +0200 -Subject: [PATCH] dialog: ignore 408 on keepalive with cseq 0 - -- some UAs do not reply at all - -(cherry picked from commit 7aa8056a5e3a9804133cb9ff79640d8116be63da) ---- - src/modules/dialog/dlg_req_within.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/modules/dialog/dlg_req_within.c b/src/modules/dialog/dlg_req_within.c -index d48d139..8098345 100644 ---- a/src/modules/dialog/dlg_req_within.c -+++ b/src/modules/dialog/dlg_req_within.c -@@ -271,6 +271,12 @@ void dlg_ka_cb_all(struct cell* t, int type, struct tmcb_params* ps, int dir) - LM_DBG("skip updating non-confirmed dialogs\n"); - goto done; - } -+ if(ps->code==408 && (dlg->cseq[dir].len==0 -+ || (dlg->cseq[dir].len==1 && dlg->cseq[dir].s[0]=='\0'))) { -+ LM_DBG("ignore 408 for %s cseq 0\n", -+ ((dir==DLG_CALLER_LEG)?"caller":"callee")); -+ goto done; -+ } - tend = 0; - if(dir==DLG_CALLER_LEG) { - dlg->ka_src_counter++; diff --git a/debian/patches/upstream/lwsc-set-ws_ping_pong_interval-only-for-libwebsocket.patch b/debian/patches/upstream/lwsc-set-ws_ping_pong_interval-only-for-libwebsocket.patch deleted file mode 100644 index 2f711e019..000000000 --- a/debian/patches/upstream/lwsc-set-ws_ping_pong_interval-only-for-libwebsocket.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Thu, 6 May 2021 11:37:58 +0200 -Subject: [PATCH] lwsc: set ws_ping_pong_interval only for libwebsockets 3.x - -(cherry picked from commit 048ed4210d52fb817ae6b03756d95e9b25899330) ---- - src/modules/lwsc/lwsc_mod.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/modules/lwsc/lwsc_mod.c b/src/modules/lwsc/lwsc_mod.c -index 17eb0ca..a6985ac 100644 ---- a/src/modules/lwsc/lwsc_mod.c -+++ b/src/modules/lwsc/lwsc_mod.c -@@ -529,7 +529,7 @@ static lwsc_endpoint_t* lwsc_get_endpoint(str *wsurl, str *wsproto) - ep->crtinfo.protocols = ep->protocols; - ep->crtinfo.gid = -1; - ep->crtinfo.uid = -1; --#if LWS_LIBRARY_VERSION_MAJOR >= 3 -+#if LWS_LIBRARY_VERSION_MAJOR == 3 - ep->crtinfo.ws_ping_pong_interval = 5; /*secs*/ - #endif - /* 1 internal and 1 (+ 1 http2 nwsi) */ diff --git a/debian/patches/upstream/nathelper-don-t-fail-if-a-rtcp-has-no-IP.patch b/debian/patches/upstream/nathelper-don-t-fail-if-a-rtcp-has-no-IP.patch deleted file mode 100644 index 61b363cc9..000000000 --- a/debian/patches/upstream/nathelper-don-t-fail-if-a-rtcp-has-no-IP.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Victor Seva -Date: Tue, 8 Jun 2021 15:03:21 +0200 -Subject: nathelper: don't fail if 'a=rtcp' has no IP - -Examples from RFC3605: -> m=audio 49170 RTP/AVP 0 -> a=rtcp:53020 -> -> m=audio 49170 RTP/AVP 0 -> a=rtcp:53020 IN IP4 126.16.64.4 -> -> m=audio 49170 RTP/AVP 0 -> a=rtcp:53020 IN IP6 2001:2345:6789:ABCD:EF01:2345:6789:ABCD ---- - src/modules/nathelper/nathelper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c -index baae1db..9512834 100644 ---- a/src/modules/nathelper/nathelper.c -+++ b/src/modules/nathelper/nathelper.c -@@ -1655,7 +1655,7 @@ static inline int replace_sdp_ip( - hasreplaced = 1; - body1 = body2; - } -- if(!hasreplaced) { -+ if(!hasreplaced && memcmp("a=rtcp", line, 6) != 0) { - LM_ERR("can't extract '%s' IP from the SDP\n", line); - return -1; - } diff --git a/debian/patches/upstream/presence-set-correct-type-for-local_log_facility-mod.patch b/debian/patches/upstream/presence-set-correct-type-for-local_log_facility-mod.patch deleted file mode 100644 index f5f10db89..000000000 --- a/debian/patches/upstream/presence-set-correct-type-for-local_log_facility-mod.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Wed, 12 May 2021 18:14:29 +0200 -Subject: [PATCH] presence: set correct type for local_log_facility modparam - -(cherry picked from commit 5f4662a95a97d5224bf03745a9a354a41925706c) ---- - src/modules/presence/presence.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c -index 301113a..09751bb 100644 ---- a/src/modules/presence/presence.c -+++ b/src/modules/presence/presence.c -@@ -232,7 +232,7 @@ static param_export_t params[]={ - { "fetch_rows", INT_PARAM, &pres_fetch_rows}, - { "db_table_lock_type", INT_PARAM, &pres_db_table_lock_type}, - { "local_log_level", PARAM_INT, &pres_local_log_level}, -- { "local_log_facility", PARAM_STR, &pres_log_facility_str}, -+ { "local_log_facility", PARAM_STRING, &pres_log_facility_str}, - { "subs_remove_match", PARAM_INT, &pres_subs_remove_match}, - { "xavp_cfg", PARAM_STR, &pres_xavp_cfg}, - { "retrieve_order", PARAM_INT, &pres_retrieve_order}, diff --git a/debian/patches/upstream/tcpops-use-fixup_igp_all-instead-of-fixup_igp_null.patch b/debian/patches/upstream/tcpops-use-fixup_igp_all-instead-of-fixup_igp_null.patch deleted file mode 100644 index 3b430b0e1..000000000 --- a/debian/patches/upstream/tcpops-use-fixup_igp_all-instead-of-fixup_igp_null.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Sat, 8 May 2021 23:30:22 +0200 -Subject: [PATCH] tcpops: use fixup_igp_all() instead of fixup_igp_null() - -- needed for functions with many parameters - -(cherry picked from commit 02240711239149e2f5c4890a70ab158d10fa8187) ---- - src/modules/tcpops/tcpops_mod.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c -index b2d2fbe..23036fd 100644 ---- a/src/modules/tcpops/tcpops_mod.c -+++ b/src/modules/tcpops/tcpops_mod.c -@@ -78,27 +78,27 @@ static pv_export_t mod_pvs[] = { - - static cmd_export_t cmds[]={ - {"tcp_keepalive_enable", (cmd_function)w_tcp_keepalive_enable4, 4, -- fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_keepalive_enable", (cmd_function)w_tcp_keepalive_enable3, 3, -- fixup_igp_null, fixup_free_igp_null, REQUEST_ROUTE|ONREPLY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, REQUEST_ROUTE|ONREPLY_ROUTE}, - {"tcp_keepalive_disable", (cmd_function)w_tcp_keepalive_disable1, 1, -- fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_keepalive_disable", (cmd_function)w_tcp_keepalive_disable0, 0, - 0, 0, REQUEST_ROUTE|ONREPLY_ROUTE}, - {"tcp_set_connection_lifetime", (cmd_function)w_tcpops_set_connection_lifetime2, 2, -- fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_set_connection_lifetime", (cmd_function)w_tcpops_set_connection_lifetime1, 1, -- fixup_igp_null, fixup_free_igp_null, REQUEST_ROUTE|ONREPLY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, REQUEST_ROUTE|ONREPLY_ROUTE}, - {"tcp_enable_closed_event", (cmd_function)w_tcpops_enable_closed_event1, 1, -- fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_enable_closed_event", (cmd_function)w_tcpops_enable_closed_event0, 0, - 0, 0, REQUEST_ROUTE|ONREPLY_ROUTE}, - {"tcp_conid_state", (cmd_function)w_tcp_conid_state, 1, -- fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_get_conid", (cmd_function)w_tcp_get_conid, 2, - fixup_spve_pvar, fixup_free_spve_pvar, ANY_ROUTE}, - {"tcp_conid_alive", (cmd_function)w_tcp_conid_alive, 1, -- fixup_igp_null, fixup_free_igp_null, ANY_ROUTE}, -+ fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_set_otcpid", (cmd_function)w_tcp_set_otcpid, 1, - fixup_igp_all, fixup_free_igp_all, ANY_ROUTE}, - {"tcp_set_otcpid_flag", (cmd_function)w_tcp_set_otcpid_flag, 1, diff --git a/debian/patches/upstream/tm-lw-parser-fix-matching-To-header-in-lw_get_hf_nam.patch b/debian/patches/upstream/tm-lw-parser-fix-matching-To-header-in-lw_get_hf_nam.patch deleted file mode 100644 index 9806a1f92..000000000 --- a/debian/patches/upstream/tm-lw-parser-fix-matching-To-header-in-lw_get_hf_nam.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Wed, 5 May 2021 18:56:04 +0200 -Subject: [PATCH] tm: lw parser - fix matching To header in lw_get_hf_name() - -(cherry picked from commit 4ab6e05df56afb7802a2cd125e89b9282a1c6c85) ---- - src/modules/tm/lw_parser.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/modules/tm/lw_parser.c b/src/modules/tm/lw_parser.c -index d13ec58..6f48304 100644 ---- a/src/modules/tm/lw_parser.c -+++ b/src/modules/tm/lw_parser.c -@@ -188,9 +188,11 @@ char *lw_get_hf_name(char *begin, char *end, enum _hdr_types_t *type) - - case 't': /* To */ - if(LOWER_BYTE(*(p + 1)) == 'o') { -- p += 2; -- *type = HDR_TO_T; -- break; -+ if((*(p + 2) == ' ') || (*(p + 2) == ':')) { -+ p += 2; -+ *type = HDR_TO_T; -+ break; -+ } - } - if((*(p + 1) == ' ') || (*(p + 1) == ':')) { - p++; diff --git a/debian/patches/upstream/topos-init-xavp-and-context-modparams-to-str-null.patch b/debian/patches/upstream/topos-init-xavp-and-context-modparams-to-str-null.patch deleted file mode 100644 index dc0bbf1a6..000000000 --- a/debian/patches/upstream/topos-init-xavp-and-context-modparams-to-str-null.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Daniel-Constantin Mierla -Date: Thu, 13 May 2021 17:53:18 +0200 -Subject: [PATCH] topos: init xavp and context modparams to str null - -(cherry picked from commit 5e3f7e1557d90a3e6f40eff41cc0b0bb317ab544) ---- - src/modules/topos/topos_mod.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/src/modules/topos/topos_mod.c b/src/modules/topos/topos_mod.c -index ba58920..498cc8d 100644 ---- a/src/modules/topos/topos_mod.c -+++ b/src/modules/topos/topos_mod.c -@@ -107,13 +107,13 @@ str _tps_contact_host = str_init(""); - int _tps_contact_mode = 0; - str _tps_cparam_name = str_init("tps"); - --str _tps_xavu_cfg = str_init(""); --str _tps_xavu_field_acontact = str_init(""); --str _tps_xavu_field_bcontact = str_init(""); --str _tps_xavu_field_contact_host = str_init(""); -+str _tps_xavu_cfg = STR_NULL; -+str _tps_xavu_field_acontact = STR_NULL; -+str _tps_xavu_field_bcontact = STR_NULL; -+str _tps_xavu_field_contact_host = STR_NULL; - --str _tps_context_param = str_init(""); --str _tps_context_value = str_init(""); -+str _tps_context_param = STR_NULL; -+str _tps_context_value = STR_NULL; - - sanity_api_t scb; - -@@ -247,7 +247,8 @@ static int mod_init(void) - if(sruid_init(&_tps_sruid, '-', "tpsh", SRUID_INC)<0) - return -1; - -- if (_tps_contact_mode == 2 && (_tps_xavu_field_acontact.len <= 0 -+ if (_tps_contact_mode == 2 && (_tps_xavu_cfg.len <= 0 -+ || _tps_xavu_field_acontact.len <= 0 - || _tps_xavu_field_bcontact.len <= 0)) { - LM_ERR("contact_mode parameter is 2," - " but a_contact or b_contact xavu fields not defined\n"); diff --git a/debian/patches/upstream/usrloc-unnecessary-periodic-db-queries-cancelled.patch b/debian/patches/upstream/usrloc-unnecessary-periodic-db-queries-cancelled.patch deleted file mode 100644 index 159ab5148..000000000 --- a/debian/patches/upstream/usrloc-unnecessary-periodic-db-queries-cancelled.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: korayvt -Date: Tue, 4 May 2021 15:07:38 +0300 -Subject: [PATCH] usrloc: unnecessary periodic db queries cancelled - -(cherry picked from commit 42bc79b3b617632b6f83e1352b5cb8266706d7c0) ---- - src/modules/usrloc/dlist.c | 4 +++- - src/modules/usrloc/udomain.c | 6 ++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/modules/usrloc/dlist.c b/src/modules/usrloc/dlist.c -index 113c16c..0743bc5 100644 ---- a/src/modules/usrloc/dlist.c -+++ b/src/modules/usrloc/dlist.c -@@ -966,7 +966,9 @@ int synchronize_all_udomains(int istart, int istep) - res |= db_timer_udomain(ptr->d); - } - } -- ul_ka_db_records((unsigned int)istart); -+ if (ul_ka_mode != ULKA_NONE) { -+ ul_ka_db_records((unsigned int)istart); -+ } - } else { - for( ptr=_ksr_ul_root ; ptr ; ptr=ptr->next) { - mem_timer_udomain(ptr->d, istart, istep); -diff --git a/src/modules/usrloc/udomain.c b/src/modules/usrloc/udomain.c -index 9d96b2d..204ddfd 100644 ---- a/src/modules/usrloc/udomain.c -+++ b/src/modules/usrloc/udomain.c -@@ -1094,8 +1094,10 @@ int db_timer_udomain(udomain_t* _d) - db_val_t vals[3]; - int key_num = 2; - -- /* call contact expired call back for a domain before deleting database rows */ -- udomain_contact_expired_cb(ul_dbh, _d); -+ /* If contact-expired callback exists, run it for a domain before deleting database rows */ -+ if (exists_ulcb_type(UL_CONTACT_EXPIRE)) { -+ udomain_contact_expired_cb(ul_dbh, _d); -+ } - - keys[0] = &ul_expires_col; - ops[0] = "<";