[sr-dev] improving the dialog module

Timo Reimann timo.reimann at 1und1.de
Mon Mar 15 11:20:19 CET 2010


Juha Heinanen wrote:
> Timo Reimann writes:
> 
>  > That will definitely break the single-dialog approach. However, one could
>  > work around this by introducing a counter to dialogs which is incremented
>  > for each re-seen, unconfirmed request and decremented when responses are
>  > forwarded (i.e., when the dialog module calls dlg_onreply()). There, the
>  > dialog's state wouldn't be modified unless the counter drops to zero.
> 
> if you don't like two dialogs, why not just do not call the dialog
> functions when request spirals to P1 the second time?

By "dialog functions", do you mean the dialog module-internal ones that
manage dialogs or the dialog callback functions?

In case of the former: My custom patch does exactly that: If a spiral is
detected, skip calls to internal functions that would otherwise create a
new dialog. That's how my notion of dialog continuation works but as
Ovidiu showed, it breaks stuff in certain scenarios (which should be
solved by using a counter just like I proposed).

In case of the latter (and assuming that the former isn't done): From a
dialog callback user's perspective, you cannot easily tell whether a
call is spiraling or is a "real" new call without keeping additional
state (e.g., "have I seen this call before?"). That's the main reason
why I think multiple dialogs are troublesome.


Cheers,

--Timo



More information about the sr-dev mailing list