Changeset 5412 for source/ariba/utility
- Timestamp:
- Jul 29, 2009, 11:45:17 AM (15 years ago)
- Location:
- source/ariba/utility
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp
r5358 r5412 217 217 218 218 if (sdp_session_ == NULL) { 219 logging_error( "something is wrong with your SDP server, nothing registered ");219 logging_error( "something is wrong with your SDP server, nothing registered: " << strerror(errno) ); 220 220 } else { 221 221 int ret = sdp_record_register(sdp_session_, &record, 0); 222 222 223 223 if(ret < 0){ 224 logging_error("failed registering sdp record ");224 logging_error("failed registering sdp record: " << strerror(errno)); 225 225 }else{ 226 226 logging_debug("sdp record registered using session " << sdp_session_); … … 269 269 sock = hci_open_dev(dev_id); 270 270 if (dev_id < 0 || sock < 0) { 271 logging_error("opening socket for device " << dev_id << " failed. can not scan for peers"); 271 logging_error("opening socket for device " 272 << dev_id << " failed. can not scan for peers: " << strerror(errno)); 272 273 return; 273 274 } … … 280 281 num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags); 281 282 if (num_rsp < 0) 282 logging_error("hci_inquiry failed with " << num_rsp );283 logging_error("hci_inquiry failed with " << num_rsp << ": " << strerror(errno)); 283 284 284 285 for (i = 0; i < num_rsp; i++) { … … 289 290 290 291 logging_debug("found peer [" << saddress << "] [" << sname << "]"); 291 292 // TODO: sdp_search can be very slow, fork it!293 292 sdp_search( address, sname ); 294 293 } … … 297 296 close(sock); 298 297 299 int nextscan = (rand() % 40) + 5;298 int nextscan = (rand() % 30) + 5; 300 299 logging_debug("next sdp scan in " << nextscan << " seconds"); 301 300 … … 328 327 329 328 if (session == NULL) { 330 logging_error("failed to connect to SDP server at " << ba2string(&target) <<"."); 329 logging_error("failed to connect to SDP server at " 330 << ba2string(&target) << ": " << strerror(errno)); 331 331 return; 332 332 } … … 373 373 } 374 374 } else { 375 logging_error("sdp_service_search_attr_req failed with timeout ");375 logging_error("sdp_service_search_attr_req failed with timeout: " << strerror(errno)); 376 376 } 377 377 -
source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h
r5358 r5412 45 45 #include <string> 46 46 #include <ctime> 47 #include <cerrno> 47 48 #include <boost/bind.hpp> 48 49 #include <boost/asio.hpp> -
source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp
r5316 r5412 58 58 59 59 use_logging_cpp(PeriodicBroadcast); 60 const long PeriodicBroadcast::timerinterval = 1000;61 const long PeriodicBroadcast::servicetimeout = 3000;60 const long PeriodicBroadcast::timerinterval = 2000; 61 const long PeriodicBroadcast::servicetimeout = 5000; 62 62 const unsigned int PeriodicBroadcast::serverport_v4 = 5634; 63 63 const unsigned int PeriodicBroadcast::serverport_v6 = 5636; -
source/ariba/utility/logging/Logging.h
r5151 r5412 76 76 #define logging_warn(x) {colorWarn; LOG4CXX_WARN(logger,x); colorDefault; } 77 77 #define logging_error(x) {colorError; LOG4CXX_ERROR(logger,x); colorDefault; } 78 #define logging_force(x) {colorInfo; LOG4CXX_INFO(logger,x); colorDefault; } 78 79 #define logging_fatal(x) {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); } 79 80 … … 85 86 #define logging_warn(x) {colorWarn; LOG4CXX_WARN(logger,x); colorDefault; } 86 87 #define logging_error(x) {colorError; LOG4CXX_ERROR(logger,x); colorDefault; } 88 #define logging_force(x) {colorInfo; LOG4CXX_INFO(logger,x); colorDefault; } 87 89 #define logging_fatal(x) {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); } 88 90 -
source/ariba/utility/measurement/PathloadMeasurement.cpp
r3690 r5412 108 108 // get the endpoint for this node 109 109 const EndpointDescriptor& endp = baseoverlay->getEndpointDescriptor( resultNode ); 110 if( endp == EndpointDescriptor::UNSPECIFIED){110 if( endp.isUnspecified() ){ 111 111 logging_warn( "can not measure node " << resultNode.toString() << ": can't resolve endpoint" ); 112 112 return; -
source/ariba/utility/system/StartupWrapper.cpp
r5405 r5412 98 98 { 99 99 log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger()); 100 logger->setLevel(log4cxx::Level::get Warn());100 logger->setLevel(log4cxx::Level::getDebug()); 101 101 } 102 102 … … 123 123 logger->setLevel(log4cxx::Level::getDebug()); 124 124 } 125 */125 */ 126 126 127 127 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Note:
See TracChangeset
for help on using the changeset viewer.