< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] tuple.cxx and tuple.hxx confusing/bug?


m_anonv4, m_anonv6 and mSockaddr are all in a union together. This
means that they are overlayed together on the same memory. So copying
is not required.

Cheers
JAson


On 7/5/05, Roland Zheng <rzheng@xxxxxxxxxxxxxxxxxxxx> wrote:
>  
>  
> 
> In the tuple.cxx, when call 
> 
>   
> 
> Tuple::Tuple(const Data& printableAddr, 
> 
>              int port, 
> 
>              IpVersion ipVer, 
> 
>              TransportType type, 
> 
>              const Data& targetDomain) : 
> 
>   
> 
> Only the m_anonv4 or  m_anonv6 get initialized, the mSockaddr is invalid. 
> 
> But in tuple.hxx, getSockaddr() use mSockaddr as return value. 
> 
>   
> 
> This will cause problem, I think inside Tuple::Tuple(…) we should copy
> m_anonv? to mSockAddr. 
> 
>   
> 
> Roland 
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> 
>