Module: kamailio
Branch: master
Commit: 25bec8eff91b332530095ada3997b92edbb5cce6
URL:
https://github.com/kamailio/kamailio/commit/25bec8eff91b332530095ada3997b92…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-09T14:05:00Z
tm: use similar coding style for tm_xdata_replace as for tm_xdata_swap
---
Modified: src/modules/tm/h_table.c
---
Diff:
https://github.com/kamailio/kamailio/commit/25bec8eff91b332530095ada3997b92…
Patch:
https://github.com/kamailio/kamailio/commit/25bec8eff91b332530095ada3997b92…
---
diff --git a/src/modules/tm/h_table.c b/src/modules/tm/h_table.c
index db6117e557..6149c363d4 100644
--- a/src/modules/tm/h_table.c
+++ b/src/modules/tm/h_table.c
@@ -575,10 +575,7 @@ void tm_xdata_replace(tm_xdata_t *newxd, tm_xlinks_t *bakxd)
xavp_set_list(bakxd->xavps_list);
xavu_set_list(bakxd->xavus_list);
xavi_set_list(bakxd->xavis_list);
- return;
- }
-
- if(newxd != NULL && bakxd != NULL) {
+ } else if(newxd != NULL && bakxd != NULL) {
LM_DBG("replace existing list in backup xd from new xd\n");
bakxd->uri_avps_from = set_avp_list(
AVP_TRACK_FROM | AVP_CLASS_URI, &newxd->uri_avps_from);
@@ -595,7 +592,6 @@ void tm_xdata_replace(tm_xdata_t *newxd, tm_xlinks_t *bakxd)
bakxd->xavps_list = xavp_set_list(&newxd->xavps_list);
bakxd->xavus_list = xavu_set_list(&newxd->xavus_list);
bakxd->xavis_list = xavi_set_list(&newxd->xavis_list);
- return;
}
}