Changeset 4850 for source/ariba/utility


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/utility/bootstrap
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • 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.