[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11772: only close the network conne
From: |
Rob Savoye |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11772: only close the network connection when the DiskStream is done being played. |
Date: |
Tue, 19 Jan 2010 13:32:59 -0700 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 11772
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Tue 2010-01-19 13:32:59 -0700
message:
only close the network connection when the DiskStream is done being played.
modified:
cygnal/cygnal.cpp
=== modified file 'cygnal/cygnal.cpp'
--- a/cygnal/cygnal.cpp 2010-01-01 20:41:28 +0000
+++ b/cygnal/cygnal.cpp 2010-01-19 20:32:59 +0000
@@ -1040,13 +1040,20 @@
// #else
// cache.dump();
#endif
- hand->dump();
+ //hand->dump();
+ boost::shared_ptr<DiskStream> ds;
for (int i=1; i <= hand->getActiveDiskStreams(); i++) {
- boost::shared_ptr<DiskStream> ds = hand->getDiskStream(i);
+ ds = hand->getDiskStream(i);
if (ds) {
-// ds->dump();
+ //ds->dump();
// Only play the next chunk of the file.
- ds->play(i, true);
+//log_network("Sending following chunk of %s", ds->getFilespec());
+ ds->play(i, false);
+ if (ds->getState() == DiskStream::CLOSED) {
+ net.closeNet(args->netfd);
+ hand->removeClient(args->netfd);
+ done = true;
+ }
}
}
@@ -1140,11 +1147,11 @@
// done = true;
}
retries++;
- if (retries >= 10) {
- net.closeNet(args->netfd);
- hand->removeClient(args->netfd);
- done = true;
- }
+ // if (retries >= 10) {
+ // net.closeNet(args->netfd);
+ // hand->removeClient(args->netfd);
+ // done = true;
+ // }
} while (!done);
tids.decrement();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11772: only close the network connection when the DiskStream is done being played.,
Rob Savoye <=