Changeset 5681 for source/ariba
- Timestamp:
- Aug 4, 2009, 6:27:44 PM (15 years ago)
- Location:
- source/ariba/overlay/modules/chord/messages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/modules/chord/messages/Discovery.cpp
r5680 r5681 48 48 49 49 Discovery::~Discovery(){ 50 if (source_endpoint!=NULL) delete source_endpoint;51 50 } 52 51 -
source/ariba/overlay/modules/chord/messages/Discovery.h
r5679 r5681 70 70 this->follow_type = msg.follow_type; 71 71 this->ttl = msg.ttl; 72 this->source_endpoint = new EndpointDescriptor( *msg.source_endpoint );72 this->source_endpoint = msg.source_endpoint; 73 73 } 74 74 explicit Discovery(); 75 75 virtual ~Discovery(); 76 76 77 EndpointDescriptor* getSourceEndpoint() const {78 return source_endpoint;77 const EndpointDescriptor* getSourceEndpoint() const { 78 return &source_endpoint; 79 79 } 80 80 81 81 void setSourceEndpoint( const EndpointDescriptor* endpoint ) { 82 source_endpoint = new EndpointDescriptor(*endpoint);82 source_endpoint = *endpoint; 83 83 } 84 84 … … 102 102 uint8_t follow_type; 103 103 uint8_t ttl; 104 EndpointDescriptor *source_endpoint;104 EndpointDescriptor source_endpoint; 105 105 }; 106 106 … … 112 112 113 113 // serialize end-point 114 X && VO(source_endpoint);114 X && source_endpoint; 115 115 } sznEnd(); 116 116
Note:
See TracChangeset
for help on using the changeset viewer.