Ignore:
Timestamp:
May 26, 2009, 4:27:55 PM (15 years ago)
Author:
Christoph Mayer
Message:

-einige fixed bzgl. link management, fehlerhafte serialisierer, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/communication/EndpointDescriptor.cpp

    r3690 r3705  
    112112bool EndpointDescriptor::operator==(const EndpointDescriptor& rh) const {
    113113
    114         if( locator != NULL && rh.locator != NULL )
    115                 return ( locator->operator==(*rh.locator) );
     114        if( isUnspecified() && rh.isUnspecified() ) {
    116115
    117         if( locator != rh.locator )
     116                // both unspec bit set
     117                return true;
     118
     119        } else if( (!isUnspecified()) && (!rh.isUnspecified()) ) {
     120
     121                //
     122                // both are valid, check locators
     123                //
     124
     125                if( locator == NULL && rh.locator == NULL ){
     126
     127                        // both locators are invalid, ok true
     128                        return true;
     129
     130                } else if( locator == NULL ^ rh.locator == NULL ) {
     131
     132                        // one locator is invalid, the other not, false
     133                        return false;
     134
     135                } else {
     136
     137                        // both locators are valid, compare
     138                        assert( locator != NULL && rh.locator != NULL );
     139                        return ( locator->operator==(*rh.locator) );
     140
     141                }
     142
     143        } else {
     144
     145                // one is unspec, the other not
     146                assert( isUnspecified() ^ rh.isUnspecified() );
    118147                return false;
    119148
    120         return (isUnspec == rh.isUnspec);
     149        }
     150
    121151}
    122152
Note: See TracChangeset for help on using the changeset viewer.