From 4c4475f3b50abe03cfed60014c1b48eda10b4859 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 7 Oct 2013 10:45:03 +0200 Subject: Fixed authenticator thread restart. This fixes #209. --- source/Authenticator.cpp | 10 ++++++++++ source/Authenticator.h | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/source/Authenticator.cpp b/source/Authenticator.cpp index dcc63299e..a45617f93 100644 --- a/source/Authenticator.cpp +++ b/source/Authenticator.cpp @@ -100,6 +100,16 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co +void cAuthenticator::Start(void) +{ + m_ShouldTerminate = false; + super::Start(); +} + + + + + void cAuthenticator::Stop(void) { m_ShouldTerminate = true; diff --git a/source/Authenticator.h b/source/Authenticator.h index c9e647329..868476d80 100644 --- a/source/Authenticator.h +++ b/source/Authenticator.h @@ -42,7 +42,10 @@ public: /// Queues a request for authenticating a user. If the auth fails, the user is kicked void Authenticate(int a_ClientID, const AString & a_UserName, const AString & a_ServerHash); - // Stops the authenticator thread + /// Starts the authenticator thread. The thread may be started and stopped repeatedly + void Start(void); + + /// Stops the authenticator thread. The thread may be started and stopped repeatedly void Stop(void); private: -- cgit v1.2.3