- Timestamp:
- Mar 26, 2014, 6:28:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/transport/StreamTransport/StreamTransport.cpp
r12060 r12773 366 366 parent(parent), 367 367 out_queues(8), //TODO How much priorities shall we have? 368 sending(false) 368 sending(false), 369 MAGIC_NUMBER(424242) 369 370 { 370 371 header.length = 0; … … 594 595 bool restart_sending = false; 595 596 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 ] 603 604 596 605 // enqueue packet [locked] 597 606 { 598 unique_lock(out_queues_lock); 599 600 assert( priority < out_queues.size() ); 601 out_queues[priority].push(packet); 607 boost::mutex::scoped_lock lock(out_queues_lock); 608 609 int debuggingA = out_queues[priority].size(); 610 // assert ( debuggingA < 1000 ); // XXX 611 612 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 ); 602 623 603 624 if ( ! sending ) … … 622 643 bool found = false; 623 644 645 // XXX Mario: Debugging 646 if ( ! this->valid ) 647 { 648 this->sending = false; 649 cout << "/// StreamConnection::send_next_package() on INVALID STREAM" << endl; 650 return; 651 } 652 624 653 // find packet with highest priority [locked] 625 654 { 626 unique_lock(out_queues_lock); 655 boost::mutex::scoped_lock lock(out_queues_lock); 656 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 ); 627 661 628 662 for ( vector<OutQueue>::iterator it = out_queues.begin(); 629 663 it != out_queues.end(); it++ ) 630 664 { 665 int debugging = it->size(); // XXX debugging 666 // assert ( debugging < 1000 ); 667 631 668 if ( !it->empty() ) 632 669 {
Note:
See TracChangeset
for help on using the changeset viewer.