diff options
author | thlo <t.lohmar@gmx.de> | 2013-01-05 16:37:48 +0100 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2013-01-05 16:37:48 +0100 |
commit | a84fb47821356729f6bbcf5813aec5f7c6faafed (patch) | |
tree | ca3b209b5179ce9e87a9b4371a50e7747a54fba6 /vdr-smarttvweb/smarttvfactory.c | |
parent | a857c8fd7546029ddc666f835a0930f19a33be94 (diff) | |
download | vdr-plugin-smarttvweb-a84fb47821356729f6bbcf5813aec5f7c6faafed.tar.gz vdr-plugin-smarttvweb-a84fb47821356729f6bbcf5813aec5f7c6faafed.tar.bz2 |
New Web Front End. Various bug fixes.
Diffstat (limited to 'vdr-smarttvweb/smarttvfactory.c')
-rw-r--r-- | vdr-smarttvweb/smarttvfactory.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vdr-smarttvweb/smarttvfactory.c b/vdr-smarttvweb/smarttvfactory.c index a57310a..b806021 100644 --- a/vdr-smarttvweb/smarttvfactory.c +++ b/vdr-smarttvweb/smarttvfactory.c @@ -1,7 +1,7 @@ /* * smarttvfactory.h: VDR on Smart TV plugin * - * Copyright (C) 2012 Thorsten Lohmar + * Copyright (C) 2012 T. Lohmar * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -77,11 +77,28 @@ SmartTvServer::SmartTvServer(): mRequestCount(0), isInited(false), serverPort(PO SmartTvServer::~SmartTvServer() { + if (mConfig != NULL) delete mConfig; } void SmartTvServer::cleanUp() { + // close listening ports + for (uint idx= 0; idx < clientList.size(); idx++) { + if (clientList[idx] != NULL) { + close(idx); + delete clientList[idx]; + clientList[idx] = NULL; + } + } + + // close server port + close(mServerFd); + + // Leave thread + pthread_cancel(mThreadId); + pthread_join(mThreadId, NULL); + mLog.shutdown(); } |