Changeset 7532 for source/ariba/overlay
- Timestamp:
- Feb 4, 2010, 5:29:37 PM (15 years ago)
- Location:
- source/ariba/overlay
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/BaseOverlay.cpp
r7018 r7532 824 824 } 825 825 826 827 826 //ovl.visShowNodeBubble ( ovlId, nodeId, "joining..." ); 828 827 logging_info( "Starting to join spovnet " << id.toString() << … … 830 829 831 830 if(bootstrapEp.isUnspecified() && state == BaseOverlayStateInvalid){ 831 832 //** FIRST STEP - MANDATORY */ 832 833 833 834 // bootstrap against ourselfs … … 842 843 //ovl.visChangeNodeColor( ovlId, nodeId, OvlVis::NODE_COLORS_GREEN ); 843 844 844 logging_debug("starting overlay bootstrap module");845 overlayBootstrap.start(this, spovnetId, nodeId);846 overlayBootstrap.publish(bc->getEndpointDescriptor());847 848 845 } else { 846 847 //** SECOND STEP - OPTIONAL */ 849 848 850 849 // bootstrap against another node … … 857 856 } 858 857 859 void BaseOverlay::leaveSpoVNet() { 860 861 logging_info( "Leaving spovnet " << spovnetId ); 862 bool ret = ( state != this->BaseOverlayStateInvalid ); 863 858 859 void BaseOverlay::startBootstrapModules(vector<pair<BootstrapManager::BootstrapType,string> > modules){ 860 logging_debug("starting overlay bootstrap module"); 861 overlayBootstrap.start(this, spovnetId, nodeId, modules); 862 overlayBootstrap.publish(bc->getEndpointDescriptor()); 863 } 864 865 void BaseOverlay::stopBootstrapModules(){ 864 866 logging_debug("stopping overlay bootstrap module"); 865 867 overlayBootstrap.stop(); 866 868 overlayBootstrap.revoke(); 869 } 870 871 void BaseOverlay::leaveSpoVNet() { 872 873 logging_info( "Leaving spovnet " << spovnetId ); 874 bool ret = ( state != this->BaseOverlayStateInvalid ); 867 875 868 876 logging_debug( "Dropping all auto-links" ); -
source/ariba/overlay/BaseOverlay.h
r6961 r7532 274 274 275 275 /** 276 * Start the bootstrap modules 277 */ 278 void startBootstrapModules(vector<pair<BootstrapManager::BootstrapType,string> > modules); 279 280 /** 281 * Stop the bootstrap modules 282 */ 283 void stopBootstrapModules(); 284 285 /** 276 286 * Let the node leave the SpoVNet. 277 287 */ -
source/ariba/overlay/OverlayBootstrap.cpp
r7491 r7532 66 66 } 67 67 68 void OverlayBootstrap::start(BaseOverlay* _overlay, const SpoVNetID& _spovnetid, const NodeID& _nodeid){ 68 void OverlayBootstrap::start(BaseOverlay* _overlay, 69 const SpoVNetID& _spovnetid, const NodeID& _nodeid, 70 vector<pair<BootstrapManager::BootstrapType,string> > modules){ 69 71 overlay = _overlay; 70 72 spovnetid = _spovnetid; … … 74 76 75 77 manager.registerCallback( this ); 76 manager.registerModule( BootstrapManager::BootstrapTypePeriodicBroadcast ); 77 //manager.registerModule( BootstrapManager::BootstrapTypeBluetoothSdp ); 78 //manager.registerModule( BootstrapManager::BootstrapTypeMulticastDns ); 78 79 typedef pair<BootstrapManager::BootstrapType,string> X; 80 BOOST_FOREACH( X i, modules){ 81 manager.registerModule( i.first, i.second ); 82 } 79 83 80 84 watchtimer.startWatchdog(); … … 89 93 90 94 manager.unregisterCallback( this ); 91 manager.unregisterModule( BootstrapManager::BootstrapTypePeriodicBroadcast ); 92 //manager.unregisterModule( BootstrapManager::BootstrapTypeBluetoothSdp ); 93 //manager.unregisterModule( BootstrapManager::BootstrapTypeMulticastDns ); 95 manager.unregisterAllModules(); 94 96 95 97 watchtimer.stopWatchdog(); -
source/ariba/overlay/OverlayBootstrap.h
r6919 r7532 44 44 #include <ctime> 45 45 #include <deque> 46 #include <vector> 46 47 #include <algorithm> 47 48 #include <boost/thread/mutex.hpp> 49 #include <boost/foreach.hpp> 48 50 #include "ariba/utility/logging/Logging.h" 49 51 #include "ariba/utility/types.h" … … 60 62 using std::deque; 61 63 using std::string; 64 using std::vector; 65 using std::pair; 62 66 using std::ostringstream; 63 67 using ariba::utility::SpoVNetID; … … 83 87 virtual ~OverlayBootstrap(); 84 88 85 void start(BaseOverlay* _overlay, const SpoVNetID& _spovnetid, const NodeID& _nodeid); 89 void start( 90 BaseOverlay* _overlay, 91 const SpoVNetID& _spovnetid, 92 const NodeID& _nodeid, 93 vector<pair<BootstrapManager::BootstrapType,string> > modules 94 ); 86 95 void stop(); 87 96
Note:
See TracChangeset
for help on using the changeset viewer.