[reSIProcate] Method converting SipMessage to char*

Kenneth Ho ken at fsfoundry.org
Wed Jul 4 21:33:56 CDT 2007


It may be unsafe to keep a shallow copy of Data::mBuf (in toString) from
a temporary instance of Data then use it at a later time.

ken

On Tue, 2007-07-03 at 10:54 -0400, Scott Godin wrote:
> There is also the following helper to make things easier:
> 
> const char* toString = resip::Data::from(myMsg).c_str()
> 
> http://www.resiprocate.org/Data_Overview
> 
>  
> 
> Scott
> 
>  
> 
>  
> 
> From:resiprocate-devel-bounces at list.resiprocate.org
> [mailto:resiprocate-devel-bounces at list.resiprocate.org] On Behalf Of
> Justin Matthews
> Sent: Tuesday, July 03, 2007 10:45 AM
> To: 'Tuan Viet Nguyen'; resiprocate-devel at list.resiprocate.org
> Subject: Re: [reSIProcate] Method converting SipMessage to char*
> 
> 
>  
> 
> Something like this will work:
> 
>  
> 
> resip::SipMsg *myMsg;
> 
> resip::Data data;
> 
> resip::DataStream myStream(data);
> 
>  
> 
> myMsg->encode(myStream);
> 
> myStream.flush();
> 
>  
> 
> const char * toString = data.c_str();
> 
>           
> 
>  
> 
>                                    
> ______________________________________________________________________
> From:resiprocate-devel-bounces at list.resiprocate.org
> [mailto:resiprocate-devel-bounces at list.resiprocate.org] On Behalf Of
> Tuan Viet Nguyen
> Sent: Tuesday, July 03, 2007 7:59 AM
> To: resiprocate-devel at list.resiprocate.org
> Subject: [reSIProcate] Method converting SipMessage to char*
> 
> 
>  
> 
> Hello,
> 
> Is there a method to convert SipMessage to char* ?
> 
> Thanks,
> Viet
> 
> 
>  
> 
>                                    
> ______________________________________________________________________
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.
> 
> 
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel




More information about the resiprocate-devel mailing list