From eecf91b31be4710066c87612081ab8bc350d1930 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sat, 1 Dec 2007 16:35:48 +0000 Subject: - Backwards compatible update to support Tntnet Version 1.6.0.6. Backwards compatibilty will be dropped in future version of LIVE. --- thread.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'thread.cpp') diff --git a/thread.cpp b/thread.cpp index b6d6bf3..24c0e12 100644 --- a/thread.cpp +++ b/thread.cpp @@ -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 ) { -- cgit v1.2.3