diff options
author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-05 19:39:40 +0000 |
---|---|---|
committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-05 19:39:40 +0000 |
commit | 1dc35343c241696d4d3a270a693df423b7615bfd (patch) | |
tree | e1ff164855cea3f9cb10d69e7153b5a1bebad8cc /setup.cpp | |
parent | 528b7cc1c4ecd240a923afc5f5f6fc75f6320f49 (diff) | |
download | vdr-plugin-live-1dc35343c241696d4d3a270a693df423b7615bfd.tar.gz vdr-plugin-live-1dc35343c241696d4d3a270a693df423b7615bfd.tar.bz2 |
- removed -L plugin parameter
- incorporated all code into one shared object
Diffstat (limited to 'setup.cpp')
-rw-r--r-- | setup.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
@@ -17,7 +17,6 @@ namespace vdrlive { using namespace std; Setup::Setup(): - m_libraryPath( "/usr/local/lib" ), m_serverPort( 8001 ), m_lastChannel( 0 ), m_screenshotInterval( 1000 ) @@ -27,24 +26,21 @@ Setup::Setup(): bool Setup::ParseCommandLine( int argc, char* argv[] ) { static struct option opts[] = { - { "lib", required_argument, NULL, 'L' }, { "port", required_argument, NULL, 'p' }, { "ip", required_argument, NULL, 'i' }, { 0 } }; int optchar, optind = 0; - while ( ( optchar = getopt_long( argc, argv, "L:p:i:", opts, &optind ) ) != -1 ) { + while ( ( optchar = getopt_long( argc, argv, "p:i:", opts, &optind ) ) != -1 ) { switch ( optchar ) { - case 'L': m_libraryPath = optarg; break; case 'p': m_serverPort = atoi( optarg ); break; case 'i': m_serverIps.push_back( optarg ); break; default: return false; } } - return CheckLibraryPath() && - CheckServerPort() && + return CheckServerPort() && CheckServerIps(); } @@ -52,9 +48,7 @@ char const* Setup::CommandLineHelp() const { if ( m_helpString.empty() ) { ostringstream builder; - builder << " -L DIR, --lib=DIR libtnt-live.so will be searched in DIR\n" - " (default: " << m_libraryPath << ")\n" - << " -p PORT, --port=PORT use PORT to listen for incoming connections\n" + builder << " -p PORT, --port=PORT use PORT to listen for incoming connections\n" " (default: " << m_serverPort << ")\n" << " -i IP, --ip=IP bind server only to specified IP, may appear\n" " multiple times\n" @@ -72,19 +66,6 @@ bool Setup::ParseSetupEntry( char const* name, char const* value ) return true; } - -bool Setup::CheckLibraryPath() -{ - ostringstream builder; - builder << m_libraryPath << "/libtnt-live.so"; - if ( access( builder.str().c_str(), R_OK ) != 0 ) { - esyslog( "ERROR: live can't open content library %s: %s", builder.str().c_str(), strerror( errno ) ); - cerr << "ERROR: live can't open content library " << builder << ": " << strerror( errno ) << endl; - return false; - } - return true; -} - bool Setup::CheckServerPort() { if ( m_serverPort <= 0 || m_serverPort > numeric_limits< uint16_t >::max() ) { |