Changeset 5967 for source/ariba/overlay
- Timestamp:
- Aug 14, 2009, 6:44:45 PM (15 years ago)
- Location:
- source/ariba/overlay
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/OverlayBootstrap.cpp
r5953 r5967 38 38 39 39 #include "OverlayBootstrap.h" 40 40 41 #include "BaseOverlay.h" 42 #include "ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h" 43 44 using ariba::utility::BluetoothSdp; 41 45 42 46 namespace ariba { … … 51 55 nodeid( NodeID::UNSPECIFIED ), 52 56 overlay( NULL ), 53 watchtimer(this) { 57 watchtimer(this), 58 haveOverlayConnection(false){ 54 59 55 60 srand(time(NULL)); 61 62 BluetoothSdp::CONNECTION_CHECKER = this; 56 63 } 57 64 … … 162 169 163 170 lastJoines.push_front(data); 171 } 172 173 bool OverlayBootstrap::haveOverlayConnections(){ 174 boost::mutex::scoped_lock lock(haveOverlayConnectionMutex); 175 return haveOverlayConnection; 164 176 } 165 177 … … 175 187 } 176 188 177 // TODO: --> SIGCOMM hack <-- 178 // if we have no overlay neighbors, make sure sdp is loaded 179 // sdp searching is turned off when we have bootstrapped 180 if(overlay->getOverlayNeighbors().size() > 0){ 181 182 // switch off sdp when we we _are_ in the spovnet already 183 if(manager.isModuleRegistered(BootstrapManager::BootstrapTypeBluetoothSdp)) 184 manager.unregisterModule(BootstrapManager::BootstrapTypeBluetoothSdp); 185 186 return; 189 { 190 boost::mutex::scoped_lock lock(haveOverlayConnectionMutex); 191 haveOverlayConnection = overlay->getOverlayNeighbors().size() > 0; 192 193 // we have overlay neighbors -> ok nothing to do 194 if(haveOverlayConnection > 0) return; 187 195 } 188 196 189 // make sure sdp is running when we are _not_ in the spovnet 190 if(!manager.isModuleRegistered(BootstrapManager::BootstrapTypeBluetoothSdp)) 191 manager.registerModule(BootstrapManager::BootstrapTypeBluetoothSdp); 192 193 // 194 // we have overlay neighbors -> ok 195 // 196 197 // no overlay neighbors, see if we can join using old information 197 198 logging_info("overlay not joined, checking for earlier used bootstrap information"); 198 199 EndpointDescriptor joinep = EndpointDescriptor::UNSPECIFIED(); -
source/ariba/overlay/OverlayBootstrap.h
r5860 r5967 90 90 91 91 void recordJoin(const EndpointDescriptor& _ep); 92 bool haveOverlayConnections(); 92 93 93 94 protected: … … 134 135 WatchdogTimer watchtimer; 135 136 void checkOverlayStatus(); 137 138 139 bool haveOverlayConnection; 140 boost::mutex haveOverlayConnectionMutex; 136 141 }; 137 142
Note:
See TracChangeset
for help on using the changeset viewer.