1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The cCiHandler now closes its file handle when it gets destroyed

This commit is contained in:
Klaus Schmidinger 2003-05-25 11:51:28 +02:00
parent 4289180a03
commit b92bb866f6
3 changed files with 6 additions and 2 deletions

View File

@ -2201,3 +2201,4 @@ Video Disk Recorder Revision History
- Changed the DEFAULTPRIORITY in device.c to -1, so that the primary device - Changed the DEFAULTPRIORITY in device.c to -1, so that the primary device
will be used for FTA recordings in case the CAM is connected to a non-primary will be used for FTA recordings in case the CAM is connected to a non-primary
device (thanks to Reinhard Walter Buchner for reporting this one). device (thanks to Reinhard Walter Buchner for reporting this one).
- The cCiHandler now closes its file handle when it gets destroyed.

4
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.c 1.14 2003/04/20 09:52:45 kls Exp $ * $Id: ci.c 1.15 2003/05/25 11:45:11 kls Exp $
*/ */
/* XXX TODO /* XXX TODO
@ -1287,6 +1287,7 @@ void cCiCaPmt::AddCaDescriptor(int Length, uint8_t *Data)
cCiHandler::cCiHandler(int Fd, int NumSlots) cCiHandler::cCiHandler(int Fd, int NumSlots)
{ {
fd = Fd;
numSlots = NumSlots; numSlots = NumSlots;
newCaSupport = false; newCaSupport = false;
hasUserIO = false; hasUserIO = false;
@ -1301,6 +1302,7 @@ cCiHandler::~cCiHandler()
for (int i = 0; i < MAX_CI_SESSION; i++) for (int i = 0; i < MAX_CI_SESSION; i++)
delete sessions[i]; delete sessions[i];
delete tpl; delete tpl;
close(fd);
} }
cCiHandler *cCiHandler::CreateCiHandler(const char *FileName) cCiHandler *cCiHandler::CreateCiHandler(const char *FileName)

3
ci.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.h 1.7 2003/04/20 09:21:23 kls Exp $ * $Id: ci.h 1.8 2003/05/25 11:44:47 kls Exp $
*/ */
#ifndef __CI_H #ifndef __CI_H
@ -79,6 +79,7 @@ class cCiTransportConnection;
class cCiHandler { class cCiHandler {
private: private:
cMutex mutex; cMutex mutex;
int fd;
int numSlots; int numSlots;
bool newCaSupport; bool newCaSupport;
bool hasUserIO; bool hasUserIO;