[asterisk-dev] [asterisk-commits] simon.perreault: branch group/v6-new r274766 - /team/group/v6-new/main/

Simon Perreault simon.perreault at viagenie.ca
Thu Jul 8 13:04:02 CDT 2010


On 2010-07-08 14:03, Kevin P. Fleming wrote:
> OK, I understand the reasoning for not using the union... but you could
> still avoid the memcpy() problems by writing the copy like this:
> 
>   *((struct sockaddr_in *) &addr->ss) = *sin;
> 
> Yes, it's ugly, but you're keeping the ugly on purpose in this case, and
> if you forget an '*' or '&', the compiler will tell you.

Very good idea! Thanks!

Simon
-- 
NAT64/DNS64 open-source --> http://ecdysis.viagenie.ca
STUN/TURN server        --> http://numb.viagenie.ca
vCard 4.0               --> http://www.vcarddav.org



More information about the asterisk-dev mailing list