Skip to content

Commit

Permalink
resip/stack: Tuple: fix mask comparison for some platforms with 64 bi…
Browse files Browse the repository at this point in the history
…t long

git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@10296 ddefafc4-47db-0310-ae44-fa13212b10f2
  • Loading branch information
dpocock committed Jul 19, 2013
1 parent 4a445fe commit e72f9da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resip/stack/Tuple.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ Tuple::isEqualWithMask(const Tuple& compare, short mask, bool ignorePort, bool i

if(ignorePort || addr1->sin6_port == addr2->sin6_port)
{
unsigned long mask6part;
unsigned long temp;
UInt32 mask6part;
UInt32 temp;
bool match=true;
for(int i = 3; i >= 0; i--)
{
Expand Down Expand Up @@ -802,8 +802,8 @@ Tuple::isEqualWithMask(const Tuple& compare, short mask, bool ignorePort, bool i
if((*((unsigned long*)&addr1->sin6_addr.__u6_addr.__u6_addr32[i]) & htonl(mask6part)) !=
(*((unsigned long*)&addr2->sin6_addr.__u6_addr.__u6_addr32[i]) & htonl(mask6part)))
#else
if((*((unsigned long*)&addr1->sin6_addr.s6_addr16[i*2]) & htonl(mask6part)) !=
(*((unsigned long*)&addr2->sin6_addr.s6_addr16[i*2]) & htonl(mask6part)))
if((*((UInt32*)&addr1->sin6_addr.s6_addr16[i*2]) & htonl(mask6part)) !=
(*((UInt32*)&addr2->sin6_addr.s6_addr16[i*2]) & htonl(mask6part)))
#endif
{
match=false;
Expand Down

0 comments on commit e72f9da

Please sign in to comment.