Changeset 5289 for source


Ignore:
Timestamp:
Jul 24, 2009, 4:32:18 PM (15 years ago)
Author:
mies
Message:
 
Location:
source/ariba/utility
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/system/StartupWrapper.cpp

    r5285 r5289  
    9898        {
    9999                log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger());
    100                 logger->setLevel(log4cxx::Level::getAll());
     100                logger->setLevel(log4cxx::Level::getError());
    101101        }
    102102
     
    108108        {
    109109                log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("BaseCommunication"));
    110                 logger->setLevel(log4cxx::Level::getAll());
     110                logger->setLevel(log4cxx::Level::getError());
    111111        }
    112112
  • source/ariba/utility/transport/rfcomm/rfcomm.cpp

    r5286 r5289  
    4949        std::deque<link_data> send_buffer;
    5050};
     51
     52void 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
    5160
    5261inline bluetooth::rfcomm::endpoint convert( const rfcomm_endpoint& endpoint ) {
     
    222231
    223232void rfcomm::start_read(link_info* info) {
    224         cout << "Waiting for messages..." << endl;
    225 
    226233        // start read
    227234        boost::asio::async_read(info->socket,
     
    271278
    272279        // 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        }
    274284
    275285        cout << "received message of size " << info->size << endl;
     
    321331        // ignore errors and wait for all data to be sent
    322332        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                }
    324337                return;
    325338        }
  • source/ariba/utility/transport/rfcomm/rfcomm.hpp

    r5284 r5289  
    5959        void handle_write_data(const error_code& error, size_t bytes,
    6060                link_info* info, size_t size, uint8_t* buffer );
     61
     62        void remove_info(link_info* info);
    6163};
    6264
Note: See TracChangeset for help on using the changeset viewer.