Ignore:
Timestamp:
Feb 4, 2010, 5:29:37 PM (14 years ago)
Author:
Christoph Mayer
Message:

-von außen konfigurierbare bootstrap module, -periodicbroadcast crash fix

Location:
source/ariba/utility/bootstrap
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/bootstrap/BootstrapManager.cpp

    r5953 r7532  
    5454}
    5555
    56 BootstrapManager::RegistrationResult BootstrapManager::registerModule(BootstrapManager::BootstrapType type){
     56BootstrapManager::RegistrationResult BootstrapManager::registerModule(
     57                BootstrapManager::BootstrapType type, string info){
    5758
    5859        boost::mutex::scoped_lock lock( modulesMutex );
     
    6869        switch(type){
    6970        case BootstrapTypeMulticastDns:
    70                 module = new MulticastDns(this);
     71                module = new MulticastDns(this, info);
    7172                break;
    7273        case BootstrapTypePeriodicBroadcast:
    73                 module = new PeriodicBroadcast(this);
     74                module = new PeriodicBroadcast(this, info);
    7475                break;
    7576        case BootstrapTypeBluetoothSdp:
    76                 module = new BluetoothSdp(this);
     77                module = new BluetoothSdp(this, info);
    7778                break;
    7879        }
  • source/ariba/utility/bootstrap/BootstrapManager.h

    r5953 r7532  
    8585
    8686        RegistrationResult registerAllModules();
    87         RegistrationResult registerModule(BootstrapType type);
     87        RegistrationResult registerModule(BootstrapType type, string info=string(""));
    8888        RegistrationResult unregisterAllModules();
    8989        RegistrationResult unregisterModule(BootstrapType type);
  • source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp

    r7043 r7532  
    7272OverlayBootstrap* BluetoothSdp::CONNECTION_CHECKER = NULL;
    7373
    74 BluetoothSdp::BluetoothSdp(BootstrapInformationCallback* _callback) :
    75         BootstrapModule(_callback), scan_timer_(io_service_) {
     74BluetoothSdp::BluetoothSdp(BootstrapInformationCallback* _callback, string info)
     75        : BootstrapModule(_callback), scan_timer_(io_service_) {
    7676        srand( time(NULL) );
    7777#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
     
    8080        // of the info strings (as an attribute)
    8181        channel_ = 1;
    82 
    8382#endif // HAVE_BLUETOOTH_BLUETOOTH_H
    8483}
  • source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h

    r5967 r7532  
    8080        static OverlayBootstrap* CONNECTION_CHECKER;
    8181
    82         BluetoothSdp(BootstrapInformationCallback* _callback);
     82        BluetoothSdp(BootstrapInformationCallback* _callback, string info);
    8383        virtual ~BluetoothSdp();
    8484
  • source/ariba/utility/bootstrap/modules/multicastdns/MulticastDns.cpp

    r5284 r7532  
    4646use_logging_cpp(MulticastDns);
    4747
    48 MulticastDns::MulticastDns(BootstrapInformationCallback* _callback) : BootstrapModule(_callback) {
     48MulticastDns::MulticastDns(BootstrapInformationCallback* _callback, string info)
     49        : BootstrapModule(_callback) {
    4950  #ifdef HAVE_AVAHI_CLIENT_CLIENT_H
    5051        avahiclient = NULL;
  • source/ariba/utility/bootstrap/modules/multicastdns/MulticastDns.h

    r4836 r7532  
    7171        use_logging_h(MulticastDns);
    7272public:
    73         MulticastDns(BootstrapInformationCallback* _callback);
     73        MulticastDns(BootstrapInformationCallback* _callback, string info);
    7474        virtual ~MulticastDns();
    7575
  • source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp

    r5838 r7532  
    6363const unsigned int PeriodicBroadcast::serverport_v6 = 5636;
    6464
    65 PeriodicBroadcast::PeriodicBroadcast(BootstrapInformationCallback* _callback)
     65PeriodicBroadcast::PeriodicBroadcast(BootstrapInformationCallback* _callback, string info)
    6666        : BootstrapModule(_callback),
    6767        server(io_service, &newRemoteServices, &newRemoteServicesMutex) {
     
    108108
    109109        boost::mutex::scoped_lock lock( localServicesMutex );
     110        if(name.empty()) return;
     111
    110112        localServices.insert( std::make_pair(name, service) );
    111113}
     
    113115void PeriodicBroadcast::revokeService(string name){
    114116        boost::mutex::scoped_lock lock( localServicesMutex );
     117        if(name.empty()) return;
    115118
    116119        ServiceList::iterator i = localServices.find( name );
  • source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h

    r6919 r7532  
    6666        use_logging_h(PeriodicBroadcast);
    6767public:
    68         PeriodicBroadcast(BootstrapInformationCallback* _callback);
     68        PeriodicBroadcast(BootstrapInformationCallback* _callback, string info);
    6969        virtual ~PeriodicBroadcast();
    7070
     
    275275
    276276                        PeriodicBroadcastMessage msg;
     277                        if(service.getName().empty()) return;
    277278
    278279                        msg.setName( service.getName() );
     
    351352                                { // insert new found service
    352353                                        boost::mutex::scoped_lock lock( *servicesmutex );
     354                                        if(msg.getName().empty()) return;
    353355
    354356                                        ServiceList::iterator it = services->find( msg.getName() );
Note: See TracChangeset for help on using the changeset viewer.