[reSIProcate] MessageDecorator bug?
andrea chiappori
andrea.chiappori at gmail.com
Wed Oct 29 06:40:56 CDT 2008
Hi,
I'm testing DUM using Resiprocate release 1.4 (SVN head) and have
noticed a strange behaviour about MessageDecorator invocation while
sending a SIP message.
To reproduce the issue I changed the sample application
basicRregister.cxx file (in "dum/test/directory") with some
modifications: I added my class SipMessageDecorator, invoked
setOutboundDecorator(), added logs and removed unregistration so that
the REGISTER message is always sent.
I set my MessageDecorator class in the main with
setOutboundDecorator() method, in this way:
SharedPtr<SipMessageDecorator> messageDecorator(new SipMessageDecorator());
clientDum.getMasterProfile()->setOutboundDecorator(messageDecorator);
After sending the first REGISTER message, the method decorateMessage()
in MessageDecorator class is called once, but the second time it is
called consecutively twice with the same message, at third REGISTER
three times (always same message) and so on.
I noticed that in DialogUsageManager the send() method adds a
MessageDecorator clone to mOutboundDecorators and the
SipMessage::callOutboundDecorator() method calls decorateMessage()
for each item in vector mOutboundDecorators, but this vector always
grows.
I attached to this mail the changed sample application that I tested
using repro and the produced log file.
Is there a bug or my mistake?
Thank you in advance.
Best regards
Andrea Chiappori
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: basicRegister.cxx
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20081029/2aba09ab/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.log
Type: application/octet-stream
Size: 53213 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20081029/2aba09ab/attachment.obj>
More information about the resiprocate-devel
mailing list