[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9845: fix network persitance when in
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9845: fix network persitance when in multi-theaded mode. |
Date: |
Wed, 17 Dec 2008 17:05:15 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9845
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2008-12-17 17:05:15 -0700
message:
fix network persitance when in multi-theaded mode.
modified:
cygnal/cygnal.cpp
=== modified file 'cygnal/cygnal.cpp'
--- a/cygnal/cygnal.cpp 2008-12-17 17:56:43 +0000
+++ b/cygnal/cygnal.cpp 2008-12-18 00:05:15 +0000
@@ -131,6 +131,8 @@
// These keep track of the number of active threads.
ThreadCounter tids;
+map<int, Network *> networks;
+
// end of globals
static LogFile& dbglogfile = LogFile::getDefaultInstance();
@@ -488,7 +490,6 @@
Network net;
bool done = false;
static int tid = 0;
- map<int, Network *> networks;
if (netdebug) {
net.toggleDebug(true);
@@ -569,8 +570,10 @@
tids.increment();
tnet = new Network;
tnet->setFileFd(args->netfd);
+ targs->netfd = args->netfd;
targs->handler = tnet;
targs->filespec = docroot;
+ targs->tid = tid;
} else {
log_debug("Not starting new HTTP thread, spawned already for
tid #%d", tid);
tnet = networks[tid];
@@ -651,10 +654,14 @@
// Call the protocol handler for this network connection
bool ret = net->getEntry(it->fd)(args);
log_debug("Handler returned %s", (ret) ? "true" :
"false");
- if (ret) {
- net->closeNet(it->fd);
- net->erasePollFD(it->fd);
- }
+ // FIXME: we currently force a 'close connection' at
the end
+ // of sending a file, since apache does too. This
pretty much
+ // blows persistance,
+// if (ret) {
+ networks[args->tid] = 0;
+ net->closeNet(it->fd);
+ net->erasePollFD(it->fd);
+// }
}
// if (!crcfile.getThreadingFlag()) {
// hand->die();
@@ -682,7 +689,8 @@
}
}
} while (!done);
-
+
+// network[];
tids.decrement();
} // end of dispatch_handler
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9845: fix network persitance when in multi-theaded mode.,
rob <=