Menu

#238 create_dialog() - Clear flags before setting new ones

trunk
closed-fixed
modules (179)
5
2012-08-07
2012-08-02
No

Currently, if a dialog has already been created, calling create_dialog() with parameters appends the passed flags to the current dialogs flags. This means there is no way to remove a flag after is has been set.

Example:

#Pings callee and sends BYE on timeout
create_dialog("Bp");
#Will still ping callee
create_dialog("B");
#Will now ping caller, callee, and send BYE on timeout
create_dialog("P");

This patch causes create_dialog(), when called with a parameter, to first clear the currently set flags before applying the new flags passed in the function.

Example:

#Pings callee and sends BYE on timeout
create_dialog("Bp");
#No longer pings callee, just sends BYE on timeout
create_dialog("B");
#Just pings caller, does not send BYE on timeout
create_dialog("P");

#Ping caller, callee, and send BYE on timeout
create_dialog("pPB");
#Clears flags, no pings, no BYE on timeout
create_dialog("");

#Makes no changes to flags
create_dialog();

The biggest use case for this is the ability to control pinging the callee when hunting through multiple endpoints that may have varying support for In-Dialog OPTIONS.

Thanks.

Discussion

  • Ryan Bullock

    Ryan Bullock - 2012-08-02

    Clear flags for already created dialogs before setting new flags

     
  • Bogdan-Andrei Iancu

    Ryan,

    I uploaded your patch on trunk and 1.8 - thanks for the patch.

    Regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • milestone: --> trunk
    • assigned_to: nobody --> bogdan_iancu
    • status: open --> closed-fixed
     

Log in to post a comment.