summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2014-01-07 21:05:48 +0100
committerthlo <smarttv640@gmail.com>2014-01-07 21:05:48 +0100
commit928c9f9f2093822d57c28ab04fef8ed73968f834 (patch)
tree835155e2def5f58bd1d5afe2500b5d56bf613a8f
parent20ceec13a583bfa37953280c26eb643725194944 (diff)
downloadvdr-plugin-smarttvweb-928c9f9f2093822d57c28ab04fef8ed73968f834.tar.gz
vdr-plugin-smarttvweb-928c9f9f2093822d57c28ab04fef8ed73968f834.tar.bz2
High CPU Load Fix.
-rwxr-xr-xhttpresource.c4
-rwxr-xr-xsmarttvfactory.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/httpresource.c b/httpresource.c
index 7637b18..f273f6a 100755
--- a/httpresource.c
+++ b/httpresource.c
@@ -198,6 +198,7 @@ int cHttpResource::handleRead() {
if (mPayload.size() == mReqContentLength) {
//Done
mConnState = SERVING;
+ mFactory->setWriteFlag(mFd);
return processRequest();
}
}
@@ -239,11 +240,13 @@ int cHttpResource::handleRead() {
return OKAY;
else {
mConnState = SERVING;
+ mFactory->setWriteFlag(mFd);
return processRequest();
}
} // if(content_length != 0)
else {
mConnState = SERVING;
+ mFactory->setWriteFlag(mFd);
return processRequest();
}
} // if (header end)
@@ -638,6 +641,7 @@ int cHttpResource::handleWrite() {
int cHttpResource::handlePost() {
mConnState = SERVING;
+ mFactory->setWriteFlag(mFd);
if (mPath.compare("/log") == 0) {
*(mLog->log()) << mLog->getTimeString() << ": "
diff --git a/smarttvfactory.c b/smarttvfactory.c
index 75e8da4..0478649 100755
--- a/smarttvfactory.c
+++ b/smarttvfactory.c
@@ -513,7 +513,7 @@ void SmartTvServer::acceptHttpResource(int &req_id) {
#endif
FD_SET(rfd, &mReadState);
- FD_SET(rfd, &mWriteState);
+ //FD_SET(rfd, &mWriteState);
if (rfd > mMaxFd) {
mMaxFd = rfd;