diff options
author | chriszero <zerov83@gmail.com> | 2015-02-13 14:42:35 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-02-13 14:42:35 +0100 |
commit | b5c156939ddf2fc4ec3fa27ae1c3daae28681c12 (patch) | |
tree | 964a10beb9c142bd0378cc02b8ef0d473f59d5f2 /plexgdm.h | |
parent | 2ee181403f1c332ee34f658916035524e766cd7b (diff) | |
download | vdr-plugin-plex-b5c156939ddf2fc4ec3fa27ae1c3daae28681c12.tar.gz vdr-plugin-plex-b5c156939ddf2fc4ec3fa27ae1c3daae28681c12.tar.bz2 |
Fixes segfault if there was no network connection.
Discovers servers continuously every 30 seconds.
Diffstat (limited to 'plexgdm.h')
-rw-r--r-- | plexgdm.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -15,6 +15,7 @@ #include <Poco/Format.h> #include <vdr/thread.h> +#include <vdr/tools.h> #include "PlexServer.h" @@ -32,11 +33,11 @@ public: void clientDetails(std::string c_id, std::string c_name, std::string c_port, std::string c_product, std::string c_version); std::string getClientDetails(); PlexServer* getServerList(); - void discover();; + void discover(); void checkClientRegistration(); - + void Action(void); - + //void startAll(); void startRegistration(); @@ -50,10 +51,13 @@ public: protected: - private: +private: plexgdm(); cMutex m_mutex; cCondVar m_waitCondition; + int _discoverInterval; + cTimeMs _discoverTimer; + bool _helloSent; Poco::Net::SocketAddress m_discoverAdress; Poco::Net::SocketAddress m_clientRegisterGroup; |