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.
Clear flags for already created dialogs before setting new flags
Ryan,
I uploaded your patch on trunk and 1.8 - thanks for the patch.
Regards,
Bogdan