From c4c4798dea683c580397e7c979b128920653eb24 Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Wed, 3 Jan 2007 21:53:33 +0000 Subject: - LastChannel value of "0" now returns as maximum possible channel number --- setup.cpp | 2 -- setup.h | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.cpp b/setup.cpp index 7ee2f82..0481f51 100644 --- a/setup.cpp +++ b/setup.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -66,7 +65,6 @@ char const* Setup::CommandLineHelp() const bool Setup::ParseSetupEntry( char const* name, char const* value ) { - cout << "Parsing " << name << " = " << value << endl; if ( strcmp( name, "LastChannel" ) == 0 ) m_lastChannel = atoi( value ); else return false; return true; diff --git a/setup.h b/setup.h index ef1cba3..e7740a7 100644 --- a/setup.h +++ b/setup.h @@ -1,8 +1,9 @@ #ifndef VDR_LIVE_SETUP_H #define VDR_LIVE_SETUP_H -#include #include +#include +#include #include "live.h" namespace vdrlive { @@ -21,7 +22,7 @@ public: int GetServerPort() const { return m_serverPort; } IpList const& GetServerIps() const { return m_serverIps; } // vdr-setup - int GetLastChannel() const { return m_lastChannel; } + int GetLastChannel() const { return m_lastChannel == 0 ? std::numeric_limits< int >::max() : m_lastChannel; } bool ParseCommandLine( int argc, char* argv[] ); char const* CommandLineHelp() const; -- cgit v1.2.3