summaryrefslogtreecommitdiff
path: root/thread.cpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2010-06-20 18:17:42 +0200
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2010-06-20 18:17:42 +0200
commit8edd4eb02751bbf45ab2833102dee3707fbbd499 (patch)
treecbfbebe9c403d896b1788f8fad124ee4d770002d /thread.cpp
parenta5f3edc89393f869bfc6cbcadff5b727562df88a (diff)
downloadvdr-plugin-live-cvs-commit-370.tar.gz
vdr-plugin-live-cvs-commit-370.tar.bz2
Reaction to a patch sent by Jan Willies for an other problem withcvs-commit-370
tntnet version string. Jan's patch resolved the immediate problem with regard to the updated version but was not backwards compatible for older tntnet version. My changes to the code adressed that problem and added an enhancement how to deal with that problem in the future.
Diffstat (limited to 'thread.cpp')
-rw-r--r--thread.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/thread.cpp b/thread.cpp
index bfbc6cb..515e113 100644
--- a/thread.cpp
+++ b/thread.cpp
@@ -11,7 +11,7 @@ namespace vdrlive {
using namespace std;
using namespace tnt;
-#if TNTVERSION < 1606
+#if ! TNT_CONFIG_INTERNAL
class ProtectedCString
{
public:
@@ -23,7 +23,7 @@ public:
private:
char* m_string;
};
-#endif // TNTVERSION < 1606
+#endif // ! TNT_CONFIG_INTERNAL
ServerThread::ServerThread()
{
@@ -45,11 +45,8 @@ void ServerThread::Stop()
void ServerThread::Action()
{
try {
-#if TNTVERSION >= 1606
- // tnt::Tntconfig tntconfig;
- // tntconfig.load(TntConfig::Get().GetConfigPath().c_str());
+#if TNT_CONFIG_INTERNAL
m_server.reset(new Tntnet());
- //m_server->init(tntconfig);
TntConfig::Get().Configure(*m_server);
#else
ProtectedCString configPath(TntConfig::Get().GetConfigPath().c_str());
@@ -58,7 +55,7 @@ void ServerThread::Action()
int argc = sizeof( argv ) / sizeof( argv[0] );
m_server.reset(new Tntnet( argc, argv ));
-#endif // TNTVERSION
+#endif // TNT_CONFIG_INTERNAL
m_server->run();
m_server.reset(0);
} catch (exception const& ex) {