diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2007-12-01 16:35:48 +0000 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2007-12-01 16:35:48 +0000 |
commit | eecf91b31be4710066c87612081ab8bc350d1930 (patch) | |
tree | 6b5d3d1069809b19947ca05efb785021969336b0 /thread.cpp | |
parent | 8442923f60356a16d5271579becce1894d4d8ff6 (diff) | |
download | vdr-plugin-live-eecf91b31be4710066c87612081ab8bc350d1930.tar.gz vdr-plugin-live-eecf91b31be4710066c87612081ab8bc350d1930.tar.bz2 |
- Backwards compatible update to support Tntnet Version 1.6.0.6.
Backwards compatibilty will be dropped in future version of LIVE.
Diffstat (limited to 'thread.cpp')
-rw-r--r-- | thread.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -11,6 +11,7 @@ namespace vdrlive { using namespace std; using namespace tnt; +#ifndef TNTVERS7 class ProtectedCString { public: @@ -22,6 +23,7 @@ public: private: char* m_string; }; +#endif // TNTVERS7 ServerThread::ServerThread() { @@ -43,11 +45,19 @@ void ServerThread::Stop() void ServerThread::Action() { try { +#ifdef TNTVERS7 + tnt::Tntconfig tntconfig; + tntconfig.load(TntConfig::Get().GetConfigPath().c_str()); + m_server.reset(new Tntnet()); + m_server->init(tntconfig); +#else ProtectedCString configPath( TntConfig::Get().GetConfigPath().c_str() ); char* argv[] = { const_cast< char* >( "tntnet" ), const_cast< char* >( "-c" ), configPath }; int argc = sizeof( argv ) / sizeof( argv[0] ); + m_server.reset( new Tntnet( argc, argv ) ); +#endif // TNTVERS7 m_server->run(); m_server.reset( 0 ); } catch ( exception const& ex ) { |