[reSIProcate] DUM reject() should have minExpires, warning, where appropriate
John Gregg
jgregg at aylus.com
Thu Jun 5 14:10:11 CDT 2014
We have found it useful to make the reject() method take optional
parameters for a warning header and a minExpires header where appropriate.
In an hxx file:
void reject(int statusCode, int minExpiry = -1, const WarningCategory *
warning = NULL);
Then in the cxx file:
ServerRegistration::reject(int statusCode, int minExpiry, const
WarningCategory * warning)
{
InfoLog( << "rejected a registration " << mAor << " with
statusCode=" << statusCode );
@@ -167,6 +167,16 @@
SharedPtr<SipMessage> failure(new SipMessage);
mDum.makeResponse(*failure, mRequest, statusCode);
failure->remove(h_Contacts);
+ if (minExpiry != -1)
+ {
+ failure->header(h_MinExpires).value() = minExpiry;
+ }
+
+ if (warning)
+ {
+ failure->header(h_Warnings).push_back(*warning);
+ }
+
mDum.send(failure);
delete(this);
}
Of course, not all reject() methods want both new arguments. Diff files
from 1.9.6 attached.
regards,
-John Gregg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerOutOfDialogReq.cxx.diff
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerOutOfDialogReq.hxx.diff
Type: text/x-patch
Size: 553 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerPagerMessage.cxx.diff
Type: text/x-patch
Size: 581 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerPagerMessage.hxx.diff
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerPublication.cxx.diff
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerPublication.hxx.diff
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerRegistration.cxx.diff
Type: text/x-patch
Size: 838 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerRegistration.hxx.diff
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerSubscription.cxx.diff
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServerSubscription.hxx.diff
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140605/bacb47e0/attachment-0009.bin>
More information about the resiprocate-devel
mailing list