An Overlay-based
Virtual Network Substrate
SpoVNet

Ignore:
Timestamp:
Aug 14, 2009, 6:44:45 PM (10 years ago)
Author:
Christoph Mayer
Message:

rfcomm sdp fixing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp

    r5953 r5967  
    3838
    3939#include "BluetoothSdp.h"
     40#include "ariba/overlay/OverlayBootstrap.h"
    4041
    4142#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
     
    6263namespace ariba {
    6364namespace utility {
     65
    6466use_logging_cpp(BluetoothSdp);
     67OverlayBootstrap* BluetoothSdp::CONNECTION_CHECKER = NULL;
    6568
    6669BluetoothSdp::BluetoothSdp(BootstrapInformationCallback* _callback) :
     
    258261        //
    259262
    260         //if(!haveConnections()){
     263        if(!haveConnections()){
    261264
    262265                /*
     
    304307                close(sock);
    305308
    306         //} else {
    307                 //logging_debug("have active rfcomm connections, not searching");
    308         //}
    309 
    310         int nextscan = (rand() % 5) + 3;
     309        } else {
     310                logging_debug("have active connections, no sdp searching");
     311        }
     312
     313        int nextscan = (rand() % 10) + 5;
    311314        logging_debug("next sdp scan try in " << nextscan << " seconds");
    312315
     
    419422bool BluetoothSdp::haveConnections(){
    420423
     424        // TODO: currently we check for overlay connectivity
     425
     426        if(CONNECTION_CHECKER == NULL) return false;
     427        return CONNECTION_CHECKER->haveOverlayConnections();
     428
     429
     430        /* TODO: this will check for rfcomm connections
    421431        struct hci_conn_list_req* cl = NULL;
    422432        struct hci_conn_info* ci = NULL;
     
    445455
    446456        return haveconn;
     457        */
    447458}
    448459
Note: See TracChangeset for help on using the changeset viewer.