Module: kamailio
Branch: 5.4
Commit: 73476522301b6de65b8873e4ab04041315e93a82
URL:
https://github.com/kamailio/kamailio/commit/73476522301b6de65b8873e4ab04041…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-09T19:39:05+02:00
dialog: do unlock after saving updated dialog details
- lock()/unlock() for dialog slots are reentrant
(cherry picked from commit e4cf6739e62c2ac1e5364315aaed1a7b73919253)
---
Modified: src/modules/dialog/dlg_var.c
---
Diff:
https://github.com/kamailio/kamailio/commit/73476522301b6de65b8873e4ab04041…
Patch:
https://github.com/kamailio/kamailio/commit/73476522301b6de65b8873e4ab04041…
---
diff --git a/src/modules/dialog/dlg_var.c b/src/modules/dialog/dlg_var.c
index fa9eae9d1f..b2a373a501 100644
--- a/src/modules/dialog/dlg_var.c
+++ b/src/modules/dialog/dlg_var.c
@@ -434,10 +434,11 @@ int pv_set_dlg_variable(struct sip_msg* msg, pv_param_t *param, int
op, pv_value
/* unlock dialog */
if (dlg) {
dlg->dflags |= DLG_FLAG_CHANGED_VARS;
- dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
- if ( dlg_db_mode==DB_MODE_REALTIME )
+ if ( dlg_db_mode==DB_MODE_REALTIME ) {
+ /* dlg_lock() / dlg_unlock() are reentrant */
update_dialog_dbinfo(dlg);
-
+ }
+ dlg_unlock(d_table, &(d_table->entries[dlg->h_entry]));
}
print_lists(dlg);