diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2015-04-29 13:10:06 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2015-04-29 13:10:06 +0200 |
commit | 2b9e988dd563d66a8a341a359d17c51032cbca40 (patch) | |
tree | 000f0ba47147dd6ef649abfab57220b06f361f83 /vdr.c | |
parent | b6af7a9cf93cb1f1dd433328cc1d9b6b82447e74 (diff) | |
download | vdr-2b9e988dd563d66a8a341a359d17c51032cbca40.tar.gz vdr-2b9e988dd563d66a8a341a359d17c51032cbca40.tar.bz2 |
The SVDRP port now accepts multiple concurrent connections
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.tvdr.de * - * $Id: vdr.c 4.2 2015/04/19 12:38:12 kls Exp $ + * $Id: vdr.c 4.3 2015/04/29 09:18:54 kls Exp $ */ #include <getopt.h> @@ -65,6 +65,7 @@ #include "sourceparams.h" #include "sources.h" #include "status.h" +#include "svdrp.h" #include "themes.h" #include "timers.h" #include "tools.h" @@ -375,7 +376,7 @@ int main(int argc, char *argv[]) break; case 'g' | 0x100: return GenerateIndex(optarg) ? 0 : 2; - case 'g': cSVDRP::SetGrabImageDir(*optarg != '-' ? optarg : NULL); + case 'g': SetSVDRPGrabImageDir(*optarg != '-' ? optarg : NULL); break; case 'h': DisplayHelp = true; break; @@ -831,7 +832,7 @@ int main(int argc, char *argv[]) // User interface: - Interface = new cInterface(SVDRPport); + Interface = new cInterface; // Default skins: @@ -913,6 +914,10 @@ int main(int argc, char *argv[]) sd_notify(0, "READY=1\nSTATUS=Ready"); #endif + // SVDRP: + + StartSVDRPHandler(SVDRPport); + // Main program loop: #define DELETE_MENU ((IsInfoMenu &= (Menu == NULL)), delete Menu, Menu = NULL) @@ -1418,7 +1423,7 @@ int main(int argc, char *argv[]) // Keep the recordings handler alive: RecordingsHandler.Active(); - if ((Now - LastInteract) > ACTIVITYTIMEOUT && !cRecordControls::Active() && !RecordingsHandler.Active() && !Interface->HasSVDRPConnection() && (Now - cRemote::LastActivity()) > ACTIVITYTIMEOUT) { + if ((Now - LastInteract) > ACTIVITYTIMEOUT && !cRecordControls::Active() && !RecordingsHandler.Active() && (Now - cRemote::LastActivity()) > ACTIVITYTIMEOUT) { // Handle housekeeping tasks // Shutdown: @@ -1466,6 +1471,7 @@ Exit: signal(SIGPIPE, SIG_DFL); signal(SIGALRM, SIG_DFL); + StopSVDRPHandler(); PluginManager.StopPlugins(); cRecordControls::Shutdown(); RecordingsHandler.DelAll(); |