Ignore:
Timestamp:
Aug 4, 2009, 6:27:44 PM (15 years ago)
Author:
mies
Message:
 
Location:
source/ariba/overlay/modules/chord/messages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/modules/chord/messages/Discovery.cpp

    r5680 r5681  
    4848
    4949Discovery::~Discovery(){
    50         if (source_endpoint!=NULL) delete source_endpoint;
    5150}
    5251
  • source/ariba/overlay/modules/chord/messages/Discovery.h

    r5679 r5681  
    7070                this->follow_type = msg.follow_type;
    7171                this->ttl = msg.ttl;
    72                 this->source_endpoint = new EndpointDescriptor( *msg.source_endpoint );
     72                this->source_endpoint = msg.source_endpoint;
    7373        }
    7474        explicit Discovery();
    7575        virtual ~Discovery();
    7676
    77         EndpointDescriptor* getSourceEndpoint() const {
    78                 return source_endpoint;
     77        const EndpointDescriptor* getSourceEndpoint() const {
     78                return &source_endpoint;
    7979        }
    8080
    8181        void setSourceEndpoint( const EndpointDescriptor* endpoint ) {
    82                 source_endpoint = new EndpointDescriptor(*endpoint);
     82                source_endpoint = *endpoint;
    8383        }
    8484
     
    102102        uint8_t follow_type;
    103103        uint8_t ttl;
    104         EndpointDescriptor* source_endpoint;
     104        EndpointDescriptor source_endpoint;
    105105};
    106106
     
    112112
    113113        // serialize end-point
    114         X && VO(source_endpoint);
     114        X && source_endpoint;
    115115} sznEnd();
    116116
Note: See TracChangeset for help on using the changeset viewer.