Module: kamailio
Branch: 5.6
Commit: 1e0830433e46827ed9424a6d9cc01e95546c04f0
URL:
https://github.com/kamailio/kamailio/commit/1e0830433e46827ed9424a6d9cc01e9…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-11-16T16:02:09Z
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/1e0830433e46827ed9424a6d9cc01e9…
Patch:
https://github.com/kamailio/kamailio/commit/1e0830433e46827ed9424a6d9cc01e9…
---
diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index 473736b4373..883b99b630f 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;
- }
- }
-}
-
/**
* return reference to the dlg variable value
* - unsafe - use only when it is sure that the value is not updated
@@ -449,8 +424,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:
@@ -510,8 +483,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]));
@@ -584,8 +555,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: