[OpenSER-Devel] [ openser-Patches-1886974 ] Fix dlg_end_dlg to update database

SourceForge.net noreply at sourceforge.net
Wed Feb 6 18:11:09 UTC 2008


Patches item #1886974, was opened at 2008-02-05 14:28
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1886974&group_id=139143

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: ver 1.3.x
Status: Open
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Jerome Martin (tramjoe)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Fix dlg_end_dlg to update database

Initial Comment:
This fix allows the dialog to be removed from DB when using MI dlg_en_dlg.

--- openser_1.3-3622~/modules/dialog/dlg_hash.c 2007-10-31 08:18:59.000000000 +0100
+++ openser_1.3-3622/modules/dialog/dlg_hash.c  2008-02-05 12:33:39.000000000 +0100
@@ -498,6 +498,7 @@
            switch (dlg->state) {
                case DLG_STATE_CONFIRMED_NA:
                case DLG_STATE_CONFIRMED:
+               case DLG_STATE_DELETED:
                    dlg->state = DLG_STATE_DELETED;
                    *unref = 1;
                    break;
@@ -530,7 +531,7 @@

    dlg_unlock( d_table, d_entry);

-   LM_DBG("dialog %p changed from state %d to "
+   LM_CRIT("dialog %p changed from state %d to "
        "state %d, due event %d\n",dlg,*old_state,*new_state,event);
 }


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

Comment By: Jerome Martin (tramjoe)
Date: 2008-02-05 14:50

Message:
Logged In: YES 
user_id=1712031
Originator: YES

Sorry, wrong patch. Here it is :
diff -Naurd openser_1.3-3662~/modules/dialog/dlg_req_within.c
openser_1.3-3662/modules/dialog/dlg_req_within.c

--- openser_1.3-3622~/modules/dialog/dlg_req_within.c   2008-01-16
12:04:51.000000000 +0100
+++ openser_1.3-3622/modules/dialog/dlg_req_within.c    2008-02-05
12:55:59.000000000 +0100
@@ -38,6 +38,7 @@
 #include "../../mi/tree.h"
 #include "dlg_hash.h"
 #include "dlg_req_within.h"
+#include "dlg_db_handler.h"


 #define MAX_FWD_HDR        "Max-Forwards: " MAX_FWD CRLF
@@ -166,6 +167,10 @@
    if(new_state == DLG_STATE_DELETED && old_state == DLG_STATE_DELETED
){

        LM_DBG("second final reply\n");
+       /* delete the dialog from DB */
+       if (dlg_db_mode)
+               remove_dialog_from_db(dlg);
+
        unref_dlg(dlg, 1);
    }


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1886974&group_id=139143



More information about the Devel mailing list