[mythtv] MythSocket class
Jim Westfall
jwestfall at surrealistic.net
Mon May 29 17:03:08 UTC 2006
Jim Westfall <jwestfall at surrealistic.net> wrote [05.28.06]:
> John P Poet <jppoet at gmail.com> wrote [05.28.06]:
> >
> > Commented that line out on both backends, but it did not seem to help.
> > The slave backend (cobalt) is still not used.
> >
> > I have attached the resulting logs.
> >
> > John
>
> It made it further, but there is another issue.
>
> MythSocket::readBlock() call is forcing sockets to be put back onto
> readyread monitoring, when it might not be wanted.
>
> I will see about making a patch tomorrow.
give this patch a try.
jim
-------------- next part --------------
diff -ur mythtv.old/libs/libmyth/mythsocket.cpp mythtv/libs/libmyth/mythsocket.cpp
--- mythtv.old/libs/libmyth/mythsocket.cpp 2006-05-28 22:30:58.000000000 -0700
+++ mythtv/libs/libmyth/mythsocket.cpp 2006-05-28 22:18:22.000000000 -0700
@@ -185,8 +185,6 @@
return -1;
}
- m_notifyread -
Q_LONG rval if (rval = 0)
{
@@ -511,7 +509,6 @@
list
- m_notifyread WakeReadyReadThread();
return true;
}
@@ -715,7 +712,6 @@
}
else if (sock->m_cb)
{
- sock->m_notifyread VERBOSE(VB_SOCKET, SLOC(sock) + "cb->readyRead()");
sock->m_cb->readyRead(sock);
}
diff -ur mythtv.old/libs/libmyth/mythsocket.h mythtv/libs/libmyth/mythsocket.h
--- mythtv.old/libs/libmyth/mythsocket.h 2006-05-28 22:30:58.000000000 -0700
+++ mythtv/libs/libmyth/mythsocket.h 2006-05-28 22:17:33.000000000 -0700
@@ -47,6 +47,7 @@
void setSocket(int socket, Type type void setCallbacks(MythSocketCBs *cb);
+ void setReadyReadEnabled(bool enabled) { m_notifyread
Q_LONG readBlock(char *data, Q_ULONG len);
Q_LONG writeBlock(const char *data, Q_ULONG len);
diff -ur mythtv.old/programs/mythbackend/mainserver.cpp mythtv/programs/mythbackend/mainserver.cpp
--- mythtv.old/programs/mythbackend/mainserver.cpp 2006-05-28 22:30:58.000000000 -0700
+++ mythtv/programs/mythbackend/mainserver.cpp 2006-05-28 22:25:10.000000000 -0700
@@ -68,6 +68,7 @@
lock.lock();
socket socket->UpRef();
+ socket->setReadyReadEnabled(false);
lock.unlock();
waitCond.wakeOne();
}
@@ -95,6 +96,7 @@
parent->ProcessRequest(socket);
parent->MarkUnused(this);
+ socket->setReadyReadEnabled(true);
socket->DownRef();
socket }
@@ -3695,9 +3697,6 @@
masterServerSock->Unlock();
- // Handle any messages sent before the readyRead signal was connected.
- ProcessRequest(masterServerSock);
-
AutoExpire::Update(encoderList, false);
}
More information about the mythtv-dev
mailing list