Module: kamailio
Branch: 5.3
Commit: 1cb4273aa67c588552b671a98a9edb15471df129
URL:
https://github.com/kamailio/kamailio/commit/1cb4273aa67c588552b671a98a9edb1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-12T10:29:42+02:00
dialog: do unlock after saving updated dialog details
- lock()/unlock() for dialog slots are reentrant
(cherry picked from commit e4cf6739e62c2ac1e5364315aaed1a7b73919253)
(cherry picked from commit 73476522301b6de65b8873e4ab04041315e93a82)
---
Modified: src/modules/dialog/dlg_var.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1cb4273aa67c588552b671a98a9edb1…
Patch:
https://github.com/kamailio/kamailio/commit/1cb4273aa67c588552b671a98a9edb1…
---
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);