Module: kamailio
Branch: master
Commit: 5ad003617bb79ea647fbfb1eb3c3ebfc4a44280d
URL:
https://github.com/kamailio/kamailio/commit/5ad003617bb79ea647fbfb1eb3c3ebf…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-09T14:03:22Z
tm: add some more debug messages to debug X/AVP and transaction handling
---
Modified: src/modules/tm/h_table.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5ad003617bb79ea647fbfb1eb3c3ebf…
Patch:
https://github.com/kamailio/kamailio/commit/5ad003617bb79ea647fbfb1eb3c3ebf…
---
diff --git a/src/modules/tm/h_table.c b/src/modules/tm/h_table.c
index de98d99e46..db6117e557 100644
--- a/src/modules/tm/h_table.c
+++ b/src/modules/tm/h_table.c
@@ -410,6 +410,7 @@ struct cell *build_cell(struct sip_msg *p_msg)
init_synonym_id(p_msg, new_cell->md5);
init_cell_lock(new_cell);
t_stats_created();
+ LM_DBG("created new cell %p\n", new_cell);
return new_cell;
error:
@@ -444,6 +445,7 @@ struct cell *build_cell(struct sip_msg *p_msg)
xavp_reset_list();
xavu_reset_list();
xavi_reset_list();
+ LM_DBG("could not create cell\n");
return NULL;
}
@@ -524,6 +526,7 @@ void tm_xdata_swap(tm_cell_t *t, tm_xlinks_t *xd, int mode)
x = xd;
if(mode == 0) {
+ LM_DBG("copy X/AVPs from msg context to txdata\n");
if(t == NULL)
return;
x->uri_avps_from =
@@ -542,7 +545,7 @@ void tm_xdata_swap(tm_cell_t *t, tm_xlinks_t *xd, int mode)
x->xavus_list = xavu_set_list(&t->xavus_list);
x->xavis_list = xavi_set_list(&t->xavis_list);
} else if(mode == 1) {
- /* restore original avp list */
+ LM_DBG("restore X/AVPs msg context from txdata\n");
set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI, x->uri_avps_from);
set_avp_list(AVP_TRACK_TO | AVP_CLASS_URI, x->uri_avps_to);
set_avp_list(AVP_TRACK_FROM | AVP_CLASS_USER, x->user_avps_from);
@@ -561,6 +564,7 @@ void tm_xdata_swap(tm_cell_t *t, tm_xlinks_t *xd, int mode)
void tm_xdata_replace(tm_xdata_t *newxd, tm_xlinks_t *bakxd)
{
if(newxd == NULL && bakxd != NULL) {
+ LM_DBG("restore X/AVP msg context from backup data\n");
set_avp_list(AVP_TRACK_FROM | AVP_CLASS_URI, bakxd->uri_avps_from);
set_avp_list(AVP_TRACK_TO | AVP_CLASS_URI, bakxd->uri_avps_to);
set_avp_list(AVP_TRACK_FROM | AVP_CLASS_USER, bakxd->user_avps_from);
@@ -575,6 +579,7 @@ void tm_xdata_replace(tm_xdata_t *newxd, tm_xlinks_t *bakxd)
}
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);
bakxd->uri_avps_to =