From e823560ec53c7209f278fa331b2c0d227ca5529e Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 9 Mar 2014 12:15:08 +0100 Subject: Fixed adding new source types in case they are already registered --- sources.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sources.c') diff --git a/sources.c b/sources.c index 44bf7d07..20c43044 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 2.2 2010/02/28 15:15:39 kls Exp $ + * $Id: sources.c 2.2.1.1 2014/03/09 12:13:25 kls Exp $ */ #include "sources.h" @@ -112,3 +112,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; +} -- cgit v1.2.3