Module: kamailio
Branch: 5.5
Commit: fdfb8c5563bd327774802cb08b68b27faee2e840
URL:
https://github.com/kamailio/kamailio/commit/fdfb8c5563bd327774802cb08b68b27…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-11-16T16:05:42Z
dialog: remove dialog variable debugging function, it might cause race conditions
---
Modified: src/modules/dialog/dlg_var.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fdfb8c5563bd327774802cb08b68b27…
Patch:
https://github.com/kamailio/kamailio/commit/fdfb8c5563bd327774802cb08b68b27…
---
diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index b2a373a5018..8fd261c4bf5 100644
--- a/src/modules/dialog/dlg_var.c
+++ b/src/modules/dialog/dlg_var.c
@@ -254,31 +254,6 @@ int pv_parse_dialog_var_name(pv_spec_p sp, str *in)
return 0;
}
-/*! Internal debugging function: Prints the list of dialogs */
-void print_lists(struct dlg_cell *dlg) {
- struct dlg_var *varlist;
- varlist = _dlg_var_table;
- LM_DBG("Internal var-list (%p):\n", varlist);
- while (varlist) {
- LM_DBG("%.*s=%.*s (flags %i)\n",
- varlist->key.len, varlist->key.s,
- varlist->value.len, varlist->value.s,
- varlist->vflags);
- varlist = varlist->next;
- }
- if (dlg) {
- varlist = dlg->vars;
- LM_DBG("Dialog var-list (%p):\n", varlist);
- while (varlist) {
- LM_DBG("%.*s=%.*s (flags %i)\n",
- varlist->key.len, varlist->key.s,
- varlist->value.len, varlist->value.s,
- varlist->vflags);
- varlist = varlist->next;
- }
- }
-}
-
str * get_dlg_variable(struct dlg_cell *dlg, str *key)
{
str* var = NULL;
@@ -317,8 +292,6 @@ int set_dlg_variable(struct dlg_cell *dlg, str *key, str *val)
if ( dlg_db_mode==DB_MODE_REALTIME )
update_dialog_dbinfo(dlg);
- print_lists(dlg);
-
return 0;
done:
@@ -366,8 +339,6 @@ int pv_get_dlg_variable(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
}
}
- print_lists(dlg);
-
/* unlock dialog */
if (dlg) {
dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
@@ -440,8 +411,6 @@ int pv_set_dlg_variable(struct sip_msg* msg, pv_param_t *param, int
op, pv_value
}
dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
}
- print_lists(dlg);
-
dlg_release(dlg);
return 0;
error: