[sr-dev] git:5.4:73476522: dialog: do unlock after saving updated dialog details
Daniel-Constantin Mierla
miconda at gmail.com
Fri Oct 9 19:39:35 CEST 2020
Module: kamailio
Branch: 5.4
Commit: 73476522301b6de65b8873e4ab04041315e93a82
URL: https://github.com/kamailio/kamailio/commit/73476522301b6de65b8873e4ab04041315e93a82
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/73476522301b6de65b8873e4ab04041315e93a82.diff
Patch: https://github.com/kamailio/kamailio/commit/73476522301b6de65b8873e4ab04041315e93a82.patch
---
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);
More information about the sr-dev
mailing list