Changeset 4879 for source/ariba/utility/bootstrap/modules
- Timestamp:
- Jul 13, 2009, 5:41:44 PM (15 years ago)
- Location:
- source/ariba/utility/bootstrap/modules/bluetoothsdp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp
r4870 r4879 43 43 // Attribute descriptors for SDP 44 44 // base was chosen randomly 45 #define SDP_SPOVNET_BASE 0x400045 #define SDP_SPOVNET_BASE 0x4000 46 46 #define SDP_ATTR_SPOVNET_NAME 0x0000 + SDP_SPOVNET_BASE 47 47 #define SDP_ATTR_SPOVNET_INFO1 0x0001 + SDP_SPOVNET_BASE … … 133 133 */ 134 134 135 logging_info("Registering SDP service .\n");135 logging_info("Registering SDP service"); 136 136 137 137 uint8_t rfcomm_channel = channel_; … … 239 239 240 240 if (sdp_session_ == 0) { 241 std::cout 242 << "Something is wrong with your SDP server, nothing registered."; 241 logging_error( "Something is wrong with your SDP server, nothing registered" ); 243 242 } else { 244 243 sdp_record_register(sdp_session_, &record, 0); … … 260 259 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H 261 260 262 logging_info("Unregistering SDP service .\n");261 logging_info("Unregistering SDP service"); 263 262 sdp_close(sdp_session_); 264 263 … … 276 275 */ 277 276 278 logging_info("Scanning for peers .\n");277 logging_info("Scanning for peers"); 279 278 280 279 inquiry_info *ii = NULL; … … 293 292 sock = hci_open_dev(dev_id); 294 293 if (dev_id < 0 || sock < 0) { 295 perror("opening socket");294 logging_error("opening socket"); 296 295 exit(1); 297 296 } … … 304 303 num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags); 305 304 if (num_rsp < 0) 306 perror("hci_inquiry");305 logging_error("hci_inquiry"); 307 306 308 307 for (i = 0; i < num_rsp; i++) { … … 324 323 close(sock); 325 324 326 logging_info("Next scan in 20 seconds .\n");325 logging_info("Next scan in 20 seconds"); 327 326 328 327 scan_timer_.expires_from_now(boost::posix_time::seconds(20)); 329 328 scan_timer_.async_wait(boost::bind(&BluetoothSdp::bt_scan, this)); 330 331 332 329 } 333 330 … … 399 396 #endif // HAVE_BLUETOOTH_BLUETOOTH_H 400 397 401 } 402 } //namespace ariba, utility 398 }} //namespace ariba, utility -
source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h
r4870 r4879 53 53 54 54 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H 55 #include <bluetooth/bluetooth.h>56 #include <bluetooth/sdp.h>57 #include <bluetooth/sdp_lib.h>58 #include <bluetooth/hci.h>59 #include <bluetooth/hci_lib.h>55 #include <bluetooth/bluetooth.h> 56 #include <bluetooth/sdp.h> 57 #include <bluetooth/sdp_lib.h> 58 #include <bluetooth/hci.h> 59 #include <bluetooth/hci_lib.h> 60 60 #endif 61 61 … … 80 80 virtual void revokeService(string name); 81 81 82 private: 83 82 84 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H 83 84 private:85 85 void bt_scan(); 86 86 void sdp_search(bdaddr_t target); … … 88 88 sdp_session_t *sdp_session_; 89 89 uint8_t channel_; 90 91 90 #endif // HAVE_BLUETOOTH_BLUETOOTH_H 92 91 … … 95 94 boost::thread t_; 96 95 97 98 96 }; 99 97
Note:
See TracChangeset
for help on using the changeset viewer.