Address instances of different m_type's should compare differently; closes #173.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed Apr 16 18:37:20 2008 +0100 (22 months ago)
changeset 29186244ea5e7831
parent 2917 8ef8431d56d5
child 2920 67a8290b9336
child 2922 916de65f67bf
Address instances of different m_type's should compare differently; closes #173.
src/node/address.cc
     1.1 --- a/src/node/address.cc	Wed Apr 16 12:40:46 2008 -0400
     1.2 +++ b/src/node/address.cc	Wed Apr 16 18:37:20 2008 +0100
     1.3 @@ -111,9 +111,10 @@
     1.4  
     1.5  bool operator == (const Address &a, const Address &b)
     1.6  {
     1.7 -  NS_ASSERT (a.m_type == b.m_type || 
     1.8 -	     a.m_type == 0 || 
     1.9 -	     b.m_type == 0);
    1.10 +  if (a.m_type != b.m_type)
    1.11 +    {
    1.12 +      return false;
    1.13 +    }
    1.14    NS_ASSERT (a.GetLength() == b.GetLength());  
    1.15    return memcmp (a.m_data, b.m_data, a.m_len) == 0;
    1.16  }