diff options
author | deva <deva> | 2006-05-24 09:15:57 +0000 |
---|---|---|
committer | deva <deva> | 2006-05-24 09:15:57 +0000 |
commit | 7d547a29164cf9318a7eca918705bbc30e93b81d (patch) | |
tree | b78b9e756c40766d2c85e7dc35aa6c932b7bf747 /client/decoder.cc | |
parent | dd8e7832c69a5ef484a2f3b6054a482d29275f85 (diff) |
*** empty log message ***
Diffstat (limited to 'client/decoder.cc')
-rw-r--r-- | client/decoder.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/client/decoder.cc b/client/decoder.cc index 0ed2032..c5b2876 100644 --- a/client/decoder.cc +++ b/client/decoder.cc @@ -85,8 +85,19 @@ void Decoder::run() sender->start(); newconnection = false; } - senders.front()->pushFrame(frame, false, false); + senders.back()->pushFrame(frame, false, false); } else { + // Remove idle senders + QLinkedList<NetworkSender*>::iterator i; + for (i = senders.begin(); i != senders.end(); i++) { + NetworkSender *ns = *i; + if(ns->queueSize() == 0) { + i = senders.erase(i); + ns->stop(); + delete ns; + } + } + free(frame); newconnection = true; } @@ -129,3 +140,16 @@ bool Decoder::eventFilter(QObject *o, QEvent *e) // standard event processing return false; } + +Status Decoder::status() +{ + Status s; + + QLinkedList<NetworkSender*>::iterator i; + for(i = senders.begin(); i != senders.end(); i++) { + NetworkSender *ns = *i; + s.queue_sizes.push_back(ns->queueSize()); + } + + return s; +} |