[Kamailio-Devel] [ openser-Patches-2119079 ] Load Dialogs in First child rather than in mod_init

SourceForge.net noreply at sourceforge.net
Wed Sep 24 10:37:20 CEST 2008


Patches item #2119079, was opened at 2008-09-19 12:50
Message generated for change (Comment added) made by miconda
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=2119079&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: None
Priority: 5
Private: No
Submitted By: Carsten Bock (carstenbock)
Assigned to: Nobody/Anonymous (nobody)
Summary: Load Dialogs in First child rather than in mod_init

Initial Comment:
Hi,

attached the patch to load the dialogs in the first child rather than in during module initialization.
Actually i wanted to commit this to the souce tree, but due to Klaus' comment regarding new dialogs during loading, i've changed the dialog loading a little bit. 
In order to be safe while loading the dialogs, the new version will re-enumerate the dialogs in the hash-table (dlg->h_id).
With my previous commit to the dialog-module (fallback to SIP-Element-matchings) this is safe, since the dialog-matching will fallback to SIP-Element-Matching and it is safe to load dialogs while new dialogs are created. However, i believe this is not the cleanest method; but however it works properly.
What do you think?
Attached patch is against OpenSER (Kamailio) 1.3.

Kind regards,
Carsten



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

>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-09-24 11:37

Message:
The actual implementation is exposed to lose BYEs, new calls and
registrations while the dialogs are loaded. No SIP processing is
happening.

Even the dialog is loaded and a BYE comes for it, if loading takes more
than retransmission, you end up with an orphan dialog as well.

To get same behavior, the BYE (other requests) should be discarded by
openser if it looks like belonging to a dialog and loading still happens.

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

Comment By: Ovidiu Sas (osas)
Date: 2008-09-24 09:17

Message:
> In order to be safe while loading the dialogs, the new version will
> re-enumerate the dialogs in the hash-table (dlg->h_id).
What is unsafe in the existing version?

If the dialogs are loaded in the first child, then we might be ready to
receive SIP messages for dialogs that are not loaded.  This may lead to
races: a BYE is received for a dialog that is not loaded, we handle the BYE
and then later on the dialog is loaded.  As a result we end up with an
orphaned dialog.  Please correct me if I'm wrong.

Regards,
Ovidiu Sas

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

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



More information about the Devel mailing list