Changeset 5289 for source/ariba
- Timestamp:
- Jul 24, 2009, 4:32:18 PM (15 years ago)
- Location:
- source/ariba/utility
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/system/StartupWrapper.cpp
r5285 r5289 98 98 { 99 99 log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger()); 100 logger->setLevel(log4cxx::Level::get All());100 logger->setLevel(log4cxx::Level::getError()); 101 101 } 102 102 … … 108 108 { 109 109 log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("BaseCommunication")); 110 logger->setLevel(log4cxx::Level::get All());110 logger->setLevel(log4cxx::Level::getError()); 111 111 } 112 112 -
source/ariba/utility/transport/rfcomm/rfcomm.cpp
r5286 r5289 49 49 std::deque<link_data> send_buffer; 50 50 }; 51 52 void rfcomm::remove_info(link_info* info) { 53 for (vector<link_info*>::iterator i = links.begin(); i!=links.end();i++) 54 if (*i==info) { 55 delete info; 56 links.erase(i); 57 } 58 } 59 51 60 52 61 inline bluetooth::rfcomm::endpoint convert( const rfcomm_endpoint& endpoint ) { … … 222 231 223 232 void rfcomm::start_read(link_info* info) { 224 cout << "Waiting for messages..." << endl;225 226 233 // start read 227 234 boost::asio::async_read(info->socket, … … 271 278 272 279 // ignore errors and wait for all data to be received 273 if (error || bytes != info->size) return; 280 if (error || bytes != info->size) { 281 if (error) remove_info(info); 282 return; 283 } 274 284 275 285 cout << "received message of size " << info->size << endl; … … 321 331 // ignore errors and wait for all data to be sent 322 332 if (error || bytes != (size+4) ) { 323 if (error) cout << "Message sent error" << endl; 333 if (error) { 334 cout << "Message sent error" << endl; 335 remove_info(info); 336 } 324 337 return; 325 338 } -
source/ariba/utility/transport/rfcomm/rfcomm.hpp
r5284 r5289 59 59 void handle_write_data(const error_code& error, size_t bytes, 60 60 link_info* info, size_t size, uint8_t* buffer ); 61 62 void remove_info(link_info* info); 61 63 }; 62 64
Note:
See TracChangeset
for help on using the changeset viewer.