- Timestamp:
- Feb 17, 2009, 12:06:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/Node.cpp
r2409 r2439 124 124 const ServiceID Node::anonymousService = 0xFF00; 125 125 126 Node::Node(AribaModule& ariba_mod, const Name& name) : 127 ariba_mod(ariba_mod), name(name) { 128 this->context = NULL; 126 Node::Node(AribaModule& ariba_mod, const Name& node_name) : 127 ariba_mod( ariba_mod ), name( node_name ), context( NULL ){ 129 128 } 130 129 … … 134 133 void Node::join(const Name& vnetname) { 135 134 spovnetId = vnetname.toSpoVNetId(); 136 nodeId = name.toNodeId();135 nodeId = generateNodeId( name ); 137 136 this->context = ariba_mod.underlay_abs->joinSpoVNet(spovnetId, 138 137 *ariba_mod.getBootstrapNode(name), nodeId); … … 143 142 (utility::OverlayParameterSet::_OverlayStructure) parm.getBaseOverlayType(); 144 143 spovnetId = vnetname.toSpoVNetId(); 145 nodeId = name.toNodeId();144 nodeId = generateNodeId( name ); 146 145 this->context = ariba_mod.underlay_abs->createSpoVNet(spovnetId, nodeId, 147 146 ariba_mod.ip_addr, ariba_mod.tcp_port); … … 174 173 175 174 NodeID Node::generateNodeId(const Name& name) const { 176 return name.toNodeId(); 175 if( name == Name::UNSPECIFIED ) 176 return Name::random().toNodeId(); 177 else 178 return name.toNodeId(); 177 179 } 178 180
Note:
See TracChangeset
for help on using the changeset viewer.