Changeset 4224
- Timestamp:
- 07/25/08 00:29:06 (5 years ago)
- Location:
- vic/branches/cc/rtp
- Files:
-
- 2 modified
-
transmitter.cpp (modified) (2 diffs)
-
transmitter.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
vic/branches/cc/rtp/transmitter.cpp
r4219 r4224 89 89 tail_(0), 90 90 loop_layer_(1000), 91 loopback_(0) 91 loopback_(0), 92 is_cc_active_(1) 92 93 { 93 94 memset((char*)&mh_, 0, sizeof(mh_)); … … 210 211 void Transmitter::send(pktbuf* pb) 211 212 { 212 ccman_->cc_parse_buf(pb); 213 if (!busy_) { 214 double delay = txtime(pb); 215 nextpkttime_ = gettimeofday_secs() + delay; 216 output(pb); 217 /* 218 * emulate a transmit interrupt -- 219 * assume we will have more to send. 220 */ 221 msched(int(delay * 1e-3)); 222 busy_ = 1; 213 if (is_cc_active_) { 214 cc_parse_buf(pb); 223 215 } else { 224 if (head_ != 0) { 225 tail_->next = pb; 226 tail_ = pb; 227 } else 228 tail_ = head_ = pb; 229 pb->next = 0; 230 } 216 if (!busy_) { 217 double delay = txtime(pb); 218 nextpkttime_ = gettimeofday_secs() + delay; 219 output(pb); 220 /* 221 * emulate a transmit interrupt -- 222 * assume we will have more to send. 223 */ 224 msched(int(delay * 1e-3)); 225 busy_ = 1; 226 } else { 227 if (head_ != 0) { 228 tail_->next = pb; 229 tail_ = pb; 230 } else 231 tail_ = head_ = pb; 232 pb->next = 0; 233 } 234 } // if (is_cc_active_) 231 235 } 232 236 -
vic/branches/cc/rtp/transmitter.h
r4220 r4224 123 123 static int nbufs_; 124 124 static int nhdrs_; 125 126 /* Cc related variables */ 127 bool is_cc_active_; /* is Cc module activated? */ 125 128 }; 126 129
