Changeset 4850 for source/ariba


Ignore:
Timestamp:
Jul 10, 2009, 11:26:51 AM (15 years ago)
Author:
Christoph Mayer
Message:

-neues bootstrap module für dumme periodische broadcasts

Location:
source/ariba
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/Makefile.am

    r4841 r4850  
    335335  utility/bootstrap/modules/BootstrapModule.cpp \
    336336  utility/bootstrap/modules/multicastdns/MulticastDns.cpp \
    337   utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp
     337  utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp \
     338  utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp
    338339 
    339340nobase_libariba_la_HEADERS += \
     
    342343  utility/bootstrap/modules/BootstrapModule.h \
    343344  utility/bootstrap/modules/multicastdns/MulticastDns.h \
    344   utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h
     345  utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h \
     346  utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h
    345347
    346348#------------> utility :: configuration
  • source/ariba/overlay/OverlayBootstrap.cpp

    r4838 r4850  
    8989
    9090        // announcement for another spovnet
    91         if( sid != spovnetid )
    92                 return;
     91        if( sid != this->spovnetid ) return;
     92
     93        // announcement with our nodeid (either our announcement
     94        // or a node with the same id, any way -> ignore)
     95        if( nid == this->nodeid ) return;
    9396
    9497        // announcement for our spovnet
  • source/ariba/utility/bootstrap/BootstrapManager.cpp

    r4836 r4850  
    4040#include "BootstrapManager.h"
    4141#include "ariba/utility/bootstrap/modules/multicastdns/MulticastDns.h"
     42#include "ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h"
    4243
    4344namespace ariba {
     
    6566
    6667        switch(type){
    67                 case BootstrapTypeMulticastDns:
    68                         module = new MulticastDns(this);
    69                         break;
     68        case BootstrapTypeMulticastDns:
     69                module = new MulticastDns(this);
     70                break;
     71        case BootstrapTypePeriodicBroadcast:
     72                module = new PeriodicBroadcast(this);
     73                break;
    7074        }
    7175
     
    113117                RegistrationResult resone = RegistrationSucceeded;
    114118                resone = registerModule(BootstrapTypeMulticastDns);
     119
     120                if(resone != RegistrationSucceeded)
     121                        result = resone;
     122        }
     123
     124        { // periodic broadcast
     125                RegistrationResult resone = RegistrationSucceeded;
     126                resone = registerModule(BootstrapTypePeriodicBroadcast);
     127
    115128                if(resone != RegistrationSucceeded)
    116129                        result = resone;
     
    126139BootstrapManager::RegistrationResult BootstrapManager::unregisterAllModules(){
    127140        unregisterModule(BootstrapTypeMulticastDns);
     141        unregisterModule(BootstrapTypePeriodicBroadcast);
    128142        /*  todo  ...  */
    129143
  • source/ariba/utility/bootstrap/BootstrapManager.h

    r4836 r4850  
    7373
    7474        enum BootstrapType {
    75                 BootstrapTypeMulticastDns,      // use mDNS bootstrapping
     75                BootstrapTypeMulticastDns,                      // use mDNS bootstrapping
     76                BootstrapTypePeriodicBroadcast,         // stupid periodic broadcasting
    7677        };
    7778
  • source/ariba/utility/bootstrap/modules/multicastdns/MulticastDns.cpp

    r4842 r4850  
    8585
    8686        // create a new avahi client
    87         avahiclient = avahi_client_new( avahi_threaded_poll_get(avahipoll),
    88                         (AvahiClientFlags)0, MulticastDns::client_callback, this, &error );
     87        avahiclient = avahi_client_new(
     88                        avahi_threaded_poll_get(avahipoll),
     89                        (AvahiClientFlags)0,
     90                        MulticastDns::client_callback,
     91                        this,
     92                        &error
     93                        );
     94
    8995        if( avahiclient == NULL){
    9096                logging_error("creating avahi client failed with error "<<
Note: See TracChangeset for help on using the changeset viewer.