[OpenSIPS-Devel] [ opensips-Bugs-3606832 ] OpenSIPS terminates when calling dlg_db_sync

SourceForge.net noreply at sourceforge.net
Tue Mar 5 08:24:16 CET 2013


Bugs item #3606832, was opened at 2013-03-04 17:24
Message generated for change (Comment added) made by csmicrox
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3606832&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Chen-Che Huang (csmicrox)
Assigned to: Nobody/Anonymous (nobody)
Summary: OpenSIPS terminates when calling dlg_db_sync

Initial Comment:
Only one call is in session. That is, only one dialog is in the DB.
I call dlg_db_sync and then the SIP server terminates.

----------------------------------------------------------------------

>Comment By: Chen-Che Huang (csmicrox)
Date: 2013-03-04 23:24

Message:
Hi nikbyte,

Very grateful for your quick response. However, I set db_mode to 1 rather
than 0 (modparam("dialog', "db_mode", 1)).
I'll try your patch. Thanks so much.

Best regard,
Chen-Che

----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2013-03-04 22:12

Message:
I have no access to attach files. :-(

Index: modules/dialog/dlg_db_handler.c
===================================================================
--- modules/dialog/dlg_db_handler.c	(revision 9854)
+++ modules/dialog/dlg_db_handler.c	(working copy)
@@ -1804,6 +1804,8 @@

 struct mi_root* mi_sync_db_dlg(struct mi_root *cmd, void *param)
 {
+	if (dlg_db_mode == 0)
+		return init_mi_tree( 400, MI_SSTR("Cannot sync in no-db mode"));
 	if (sync_dlg_db_mem() < 0)
 		return init_mi_tree( 400, MI_SSTR("Sync mem with DB failed"));
 	else


----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2013-03-04 22:11

Message:
This bug only reproduced when db_mode=0 because we try to free uinitialized
db-handler in sync_dlg_db_mem after select_entire_dialog_table() in error:
label.
Here is the patch to disable dlg_db_sync fifo cmd when db_mode = 0.
 
You cannot use db_sync in no_db mode (db_mode=0).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3606832&group_id=232389



More information about the Devel mailing list