[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-devel
Subject:    [sr-dev] git:master:2d00ce54: dialog: fixed saving dialogs on shutdown that are already loaded at st
From:       Daniel-Constantin Mierla via sr-dev <sr-dev () lists ! kamailio ! org>
Date:       2023-12-28 10:06:17
Message-ID: E1rInHN-0000Ui-1I () www ! kamailio ! org
[Download RAW message or body]

Module: kamailio
Branch: master
Commit: 2d00ce546bb0852dc1784d5bc2e794d06f919577
URL: https://github.com/kamailio/kamailio/commit/2d00ce546bb0852dc1784d5bc2e794d06f919577

Author: Dennis Yurasov <dennis-y@yandex-team.ru>
Committer: Daniel-Constantin Mierla <miconda@gmail.com>
Date: 2023-12-28T11:06:12+01:00

dialog: fixed saving dialogs on shutdown that are already loaded at startup when using db_mode 3

- The dialogs that loaded at startup are not saved in DB on shutdown, and so not loaded at restart,
  fixes issue #3669

---

Modified: src/modules/dialog/dlg_db_handler.c

---

Diff:  https://github.com/kamailio/kamailio/commit/2d00ce546bb0852dc1784d5bc2e794d06f919577.diff
Patch: https://github.com/kamailio/kamailio/commit/2d00ce546bb0852dc1784d5bc2e794d06f919577.patch

---

diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c
index ecfd872504f..b6fe1afda6f 100644
--- a/src/modules/dialog/dlg_db_handler.c
+++ b/src/modules/dialog/dlg_db_handler.c
@@ -509,6 +509,9 @@ int load_dialog_info_from_db(
 					get_ticks());
 
 			dlg->dflags = 0;
+			if(mode == 0 && dlg_db_mode == DB_MODE_SHUTDOWN) {
+				dlg->dflags |= DLG_FLAG_NEW;
+			}
 
 			if(mode != 0) {
 				if(loaded_extra < DLG_MAX_DB_LOAD_EXTRA) {

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-leave@lists.kamailio.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic