Changeset 2439 for source/ariba/Node.cpp


Ignore:
Timestamp:
Feb 17, 2009, 12:06:28 PM (16 years ago)
Author:
Christoph Mayer
Message:

-NodeID Generierung bei UNSPECIFIED gefixt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/Node.cpp

    r2409 r2439  
    124124const ServiceID Node::anonymousService = 0xFF00;
    125125
    126 Node::Node(AribaModule& ariba_mod, const Name& name) :
    127         ariba_mod(ariba_mod), name(name) {
    128         this->context = NULL;
     126Node::Node(AribaModule& ariba_mod, const Name& node_name) :
     127        ariba_mod( ariba_mod ), name( node_name ), context( NULL ){
    129128}
    130129
     
    134133void Node::join(const Name& vnetname) {
    135134        spovnetId = vnetname.toSpoVNetId();
    136         nodeId = name.toNodeId();
     135        nodeId = generateNodeId( name );
    137136        this->context = ariba_mod.underlay_abs->joinSpoVNet(spovnetId,
    138137                        *ariba_mod.getBootstrapNode(name), nodeId);
     
    143142                (utility::OverlayParameterSet::_OverlayStructure) parm.getBaseOverlayType();
    144143        spovnetId = vnetname.toSpoVNetId();
    145         nodeId = name.toNodeId();
     144        nodeId = generateNodeId( name );
    146145        this->context = ariba_mod.underlay_abs->createSpoVNet(spovnetId, nodeId,
    147146                        ariba_mod.ip_addr, ariba_mod.tcp_port);
     
    174173
    175174NodeID 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();
    177179}
    178180
Note: See TracChangeset for help on using the changeset viewer.