Changeset 5953 for source/ariba


Ignore:
Timestamp:
Aug 14, 2009, 2:17:07 PM (15 years ago)
Author:
Christoph Mayer
Message:

more agressive sdp scan, sdp off when in spovnet, sdp on and agressive when not

Location:
source/ariba
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/OverlayBootstrap.cpp

    r5860 r5953  
    175175        }
    176176
     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;
     187        }
     188
     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        //
    177194        // we have overlay neighbors -> ok
    178         if(overlay->getOverlayNeighbors().size() > 0) return;
     195        //
    179196
    180197        logging_info("overlay not joined, checking for earlier used bootstrap information");
  • source/ariba/utility/bootstrap/BootstrapManager.cpp

    r4879 r5953  
    9797}
    9898
     99bool BootstrapManager::isModuleRegistered(BootstrapType type){
     100        boost::mutex::scoped_lock lock( modulesMutex );
     101
     102        ModuleMap::iterator i = modules.find(type);
     103        return  (i != modules.end());
     104}
     105
    99106BootstrapManager::RegistrationResult BootstrapManager::unregisterModule(
    100107                BootstrapManager::BootstrapType type){
  • source/ariba/utility/bootstrap/BootstrapManager.h

    r4879 r5953  
    8888        RegistrationResult unregisterAllModules();
    8989        RegistrationResult unregisterModule(BootstrapType type);
     90        bool isModuleRegistered(BootstrapType type);
    9091
    9192        void registerCallback(BootstrapInformationCallback* _callback);
  • source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp

    r5649 r5953  
    258258        //
    259259
    260         if(!haveConnections()){
     260        //if(!haveConnections()){
    261261
    262262                /*
     
    304304                close(sock);
    305305
    306         } else {
    307                 logging_debug("have active rfcomm connectinos, not searching");
    308         }
    309 
    310         int nextscan = (rand() % 30) + 5;
     306        //} else {
     307                //logging_debug("have active rfcomm connections, not searching");
     308        //}
     309
     310        int nextscan = (rand() % 5) + 3;
    311311        logging_debug("next sdp scan try in " << nextscan << " seconds");
    312312
Note: See TracChangeset for help on using the changeset viewer.