[Sumover-dev] [svn commit] r4279 - vic/branches/cc/rtp
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Mon Aug 18 18:47:37 BST 2008
Author: soohyunc
Date: Mon Aug 18 18:47:37 2008
New Revision: 4279
Modified:
vic/branches/cc/rtp/session.cpp
Log:
o cc_output() needed to take packets from the packet queue
(previous commit missed this part)
o when the current packet cannot be sent (using cwnd information),
then, it just does nothing (i.e., stay and wait)
Modified: vic/branches/cc/rtp/session.cpp
==============================================================================
--- vic/branches/cc/rtp/session.cpp (original)
+++ vic/branches/cc/rtp/session.cpp Mon Aug 18 18:47:37 2008
@@ -1211,30 +1211,26 @@
void SessionManager::cc_output()
{
- pktbuf* pb = get_packet_queue();
+ //pktbuf* pb = get_packet_queue();
+ pktbuf* pb = head_;
+ rtphdr* rh = (rtphdr *) pb->data;
+
+ // pass pb to TfwcSndr
tfwc_sndr_send(pb);
// cwnd value
int magic = (int) tfwc_magic();
// last acked seqno
int jack = (int) tfwc_sndr_just_acked();
- // current packet's seqno
- int seqno = (int) tfwc_sndr_get_seqno();
- // if the current packet seqno is within (cwnd + jack)
+ // while the packet seqno is within "cwnd + jack"
// then send the packets
- if (seqno <= magic + jack) {
- while (seqno <= magic + jack)
- output(pb); // call Transmitter::output(pb)
- }
- // otherwise, just queue up the packets
- else {
- if (head_ != 0) {
- tail_->next = pb;
- tail_ = pb;
- } else
- tail_ = head_ = pb;
- pb->next = 0;
+ while (rh->rh_seqno <= magic + jack) {
+ if (pb != 0) {
+ head_ = pb->next;
+ output(pb); // call Transmitter::output(pb)
+ }
+ rh = (rtphdr *) pb->data;
}
}
More information about the Sumover-dev
mailing list