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

rfcomm sdp fixing

Location:
source/ariba/utility/bootstrap/modules/bluetoothsdp
Files:
2 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
  • source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h

    r5638 r5967  
    6565
    6666namespace ariba {
     67  namespace overlay {
     68    class OverlayBootstrap;
     69  }
     70}
     71
     72using ariba::overlay::OverlayBootstrap;
     73
     74namespace ariba {
    6775namespace utility {
    6876
     
    7078        use_logging_h(BluetoothSdp);
    7179public:
     80        static OverlayBootstrap* CONNECTION_CHECKER;
     81
    7282        BluetoothSdp(BootstrapInformationCallback* _callback);
    7383        virtual ~BluetoothSdp();
Note: See TracChangeset for help on using the changeset viewer.