< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
It
looks like SipMessage::addHeader never copies the passed in buffer, so it’s
probably being deleted at some point in your code. This means that my
example needs some work. You can take a look at addHeader() and see what
it’s doing, but basically you could create a HeaderFieldValueList and initialize
the header with a HeaderFieldValue that owns a copy of the field contents.
Then I would lean towards using setRawHeader/getRawHeader instead of
addHeader(). On
a side note, it looks like ::addHeader is used internally by the parser when
building a message from the network, it’s use seems limited by users of
resip. Not copying the buffer is probably done for performance/design
reasons, but this starts to delve into the parser… -justin From: Karlsson
[mailto:boost.regex@xxxxxxxxx] I'm modify the header value in this function: decorateMessage after I modify the SipMessage, I'm using the MessageBoxA to
show this message, the modifiy header value is correctly. But why it goes wrong when send out or write to log.
On Sat, Oct 4, 2008 at 12:20 AM, Karlsson <boost.regex@xxxxxxxxx> wrote: I have use the reSIProcate DEBUG log, got the same wrong
result: Supported: replaces User-Agent: Dn%cb%01 Event: message-summary Content-Length: 0 I just want to modify the user agent as: "myua"
On Fri, Oct 3, 2008 at 11:49 PM, Justin Matthews <jmatthewsr@xxxxxxxxx>
wrote: Not sure why you would get that. You
can take a look at the resip logs to see what message was actually sent to the
network and see if it's corrupted before sending. -justin From: Karlsson [mailto:boost.regex@xxxxxxxxx]
Hi, I have encountering issue when I test it, I modify the User-Agent
header to a string, and use wireshark to capture the SIP message, but got: User-Agent:
\370L$\000\376\377\377\377\001\000\000\000\f\016\000\000\000\000\000\000\000\000\000\000 The attachment is screenshot, why? On Fri, Oct 3, 2008 at 9:59 PM, Justin Matthews <jmatthewsr@xxxxxxxxx>
wrote: Here is my response from an off-list message asking for additional help on
|