diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-07-17 14:22:42 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-07-17 14:22:42 +0200 |
commit | 8d0a800391859a151019c05d898a581013f01f73 (patch) | |
tree | 1ddef7f6307e9141c58b32cc60bce0f2a779de91 /sections.c | |
parent | a7a2bc6b0614eecbf37031fd9c6475d5bec5b2c5 (diff) | |
download | vdr-8d0a800391859a151019c05d898a581013f01f73.tar.gz vdr-8d0a800391859a151019c05d898a581013f01f73.tar.bz2 |
No longer adding section filters to the list of filters if they can't be opened
Diffstat (limited to 'sections.c')
-rw-r--r-- | sections.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sections.c 1.5 2004/02/07 15:51:57 kls Exp $ + * $Id: sections.c 1.6 2004/07/17 14:17:07 kls Exp $ */ #include "sections.h" @@ -85,11 +85,15 @@ void cSectionHandler::Add(const cFilterData *FilterData) break; } if (!fh) { - fh = new cFilterHandle(*FilterData); - filterHandles.Add(fh); - fh->handle = device->OpenFilter(FilterData->pid, FilterData->tid, FilterData->mask); + int handle = device->OpenFilter(FilterData->pid, FilterData->tid, FilterData->mask); + if (handle >= 0) { + fh = new cFilterHandle(*FilterData); + fh->handle = handle; + filterHandles.Add(fh); + } } - fh->used++; + if (fh) + fh->used++; Unlock(); } |