Changeset 12774 for source/ariba/utility/transport/StreamTransport
- Timestamp:
- Mar 26, 2014, 6:44:32 PM (11 years ago)
- Location:
- source/ariba/utility/transport/StreamTransport
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/transport/StreamTransport/StreamTransport.cpp
r12773 r12774 366 366 parent(parent), 367 367 out_queues(8), //TODO How much priorities shall we have? 368 sending(false), 369 MAGIC_NUMBER(424242) 368 sending(false) 370 369 { 371 370 header.length = 0; … … 595 594 bool restart_sending = false; 596 595 597 // FIXME Mario DEBUGGING -- copy !!598 reboost::shared_buffer_t buff = packet.linearize();599 reboost::message_t msg;600 msg.push_back(buff);601 assert ( msg.MAGIC_NUMBER == 421337 );602 // [ DEBUGGING]596 // debugging --> copy message (instead of zero copy) 597 // reboost::shared_buffer_t buff = packet.linearize(); 598 // reboost::message_t msg; 599 // msg.push_back(buff); 600 // assert ( msg.MAGIC_NUMBER == 421337 ); 601 // [ debugging ] 603 602 604 603 605 604 // enqueue packet [locked] 606 605 { 607 boost::mutex::scoped_lock lock(out_queues_lock); 608 609 int debuggingA = out_queues[priority].size(); 610 // assert ( debuggingA < 1000 ); // XXX 606 unique_lock lock(out_queues_lock); 611 607 612 608 assert ( this->valid ); 613 614 assert( priority < out_queues.size() ); // NOTE: actual assert, not in context with the extended debugging.. 615 // out_queues[priority].push(packet); // FIXME Mario 616 out_queues[priority].push(msg); // FIXME Mario 617 618 // XXX 619 int debuggingB = out_queues[priority].size(); 620 int magic = out_queues[priority].back().MAGIC_NUMBER; 621 assert ( debuggingB == debuggingA + 1 ); 622 assert ( magic == 421337 ); 623 609 assert( priority < out_queues.size() ); 610 611 // * enqueue * 612 out_queues[priority].push(packet); 613 624 614 if ( ! sending ) 625 615 { … … 643 633 bool found = false; 644 634 645 // XXX Mario: Debugging635 // I'm not sure if this can actually happen.. But let's be on the save side, here. 646 636 if ( ! this->valid ) 647 637 { 648 638 this->sending = false; 649 cout << "/// StreamConnection::send_next_package() on INVALID STREAM" << endl;650 639 return; 651 640 } … … 653 642 // find packet with highest priority [locked] 654 643 { 655 boost::mutex::scoped_lock lock(out_queues_lock);644 unique_lock lock(out_queues_lock); 656 645 657 assert ( this->valid ); // XXX TODO ggf. in if (valid) Àndern...658 assert ( this->sending );659 assert ( this->MAGIC_NUMBER == 424242 );660 assert ( this->out_queues.size() == 8 );661 662 646 for ( vector<OutQueue>::iterator it = out_queues.begin(); 663 647 it != out_queues.end(); it++ ) 664 648 { 665 int debugging = it->size(); // XXX debugging666 // assert ( debugging < 1000 );667 668 649 if ( !it->empty() ) 669 650 { -
source/ariba/utility/transport/StreamTransport/StreamTransport.hpp
r12773 r12774 66 66 virtual ~StreamConnection() 67 67 { 68 // XXX MARIO Debugging69 std::cout << "/// ~StreamConnection(): " << this << ", SENDING: " << this->sending << ", VALID: " << this->valid << std::endl;70 71 68 assert ( this->valid == false ); 72 69 } … … 133 130 shared_buffer_t buffy; 134 131 135 136 // XXX Mario: Debugging137 const int MAGIC_NUMBER;138 132 private: 139 133 std::vector<ariba::utility::LinkID*> communication_links;
Note:
See TracChangeset
for help on using the changeset viewer.