Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Ci poll debug/fail messages & VDR split into lib+app?
On Sunday 09 May 2004 01:24, Kenneth Aafløy wrote:
> I've made a suggestion for a patch, which is against mythtv cvs,
damn, forgot the patch :)
Kenneth
Index: dvbci.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dvbdev/dvbci.cpp,v
retrieving revision 1.4
diff -u -r1.4 dvbci.cpp
--- dvbci.cpp 10 Apr 2004 19:31:57 -0000 1.4
+++ dvbci.cpp 8 May 2004 23:07:31 -0000
@@ -532,11 +532,18 @@
int cCiTransportConnection::Poll(void)
{
+ int ret = ERROR;
+ bool tmp = DumpTPDUDataTransfer;
+ DumpTPDUDataTransfer = false;
+
if (state == stACTIVE) {
- if (SendTPDU(T_DATA_LAST) == OK)
- return RecvTPDU();
+ if (SendTPDU(T_DATA_LAST) == OK) {
+ ret = RecvTPDU();
}
- return ERROR;
+ }
+
+ DumpTPDUDataTransfer = tmp;
+ return ret;
}
// --- cCiTransportLayer -----------------------------------------------------
@@ -547,6 +554,7 @@
private:
int fd;
int numSlots;
+ int pollCount;
cCiTransportConnection tc[MAX_CI_CONNECT];
public:
cCiTransportLayer(int Fd, int NumSlots);
@@ -611,9 +619,13 @@
case stCREATION:
case stACTIVE:
if (!Tc->DataAvailable()) {
- if (Tc->Poll() != OK)
- ;//XXX continue;
+ pollCount++;
+ if (Tc->Poll() == ERROR) {
+ fprintf(stderr, "Tc Poll failed after %i polls.\n", pollCount);
+ pollCount = 0;
+ //XXX continue;
}
+ }
switch (Tc->LastResponse()) {
case T_REQUEST_TC:
//XXX
@@ -622,8 +634,10 @@
case T_DATA_LAST:
case T_CTC_REPLY:
case T_SB:
- if (Tc->DataAvailable())
+ if (Tc->DataAvailable()) {
+ pollCount = 0;
Tc->RecvData();
+ }
break;
case TIMEOUT:
case ERROR:
Home |
Main Index |
Thread Index