summaryrefslogtreecommitdiff
path: root/sources.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-03-09 12:11:32 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-03-09 12:11:32 +0100
commita9f1297022319c97e16f6d904254a6d0bae4442e (patch)
tree55347962328500afc784946c5e965b0c02871b10 /sources.c
parentf8058586f9d438bfd3c501a3a313a1cc1c30299b (diff)
downloadvdr-a9f1297022319c97e16f6d904254a6d0bae4442e.tar.gz
vdr-a9f1297022319c97e16f6d904254a6d0bae4442e.tar.bz2
Fixed adding new source types in case they are already registered
Diffstat (limited to 'sources.c')
-rw-r--r--sources.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sources.c b/sources.c
index c2a3dba1..f0a34327 100644
--- a/sources.c
+++ b/sources.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.c 3.5 2013/12/28 11:33:08 kls Exp $
+ * $Id: sources.c 3.6 2014/03/09 12:05:42 kls Exp $
*/
#include "sources.h"
@@ -124,3 +124,12 @@ cSource *cSources::Get(int Code)
}
return NULL;
}
+
+bool cSources::ContainsSourceType(char SourceType)
+{
+ for (cSource *p = First(); p; p = Next(p)) {
+ if (cSource::ToChar(p->Code()) == SourceType)
+ return true;
+ }
+ return false;
+}