From 145c83d1b310439d2aa39f52a49a5812f7c14102 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 29 Oct 2013 17:11:18 -0500 Subject: Add ability to tune polling speed --- servers/auth_server_lin/src/auth_conn.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'servers/auth_server_lin/src/auth_conn.cpp') diff --git a/servers/auth_server_lin/src/auth_conn.cpp b/servers/auth_server_lin/src/auth_conn.cpp index 2711cc4..bd88624 100644 --- a/servers/auth_server_lin/src/auth_conn.cpp +++ b/servers/auth_server_lin/src/auth_conn.cpp @@ -49,9 +49,12 @@ struct exit_exception { instance of this class. */ AuthSocket::AuthSocket(int sock, int serverID, TQObject *parent, const char *name) : - TDEKerberosServerSocket(parent, name), m_criticalSection(0), m_stationID(-1), m_bound(false), m_serviceID(0), m_serverID(serverID), m_terminationStamp(0), m_servActive(false), m_servState(0), m_servClientSocket(NULL), m_servClientTimeout(NULL), m_loopTimer(NULL), m_pollTimer(NULL), m_config(static_cast(parent)->m_config), m_database(NULL), m_databaseStationsCursor(NULL), + TDEKerberosServerSocket(parent, name), m_criticalSection(0), m_stationID(-1), m_bound(false), m_serviceID(0), m_serverID(serverID), m_pollInterval(100), m_terminationStamp(0), m_servActive(false), m_servState(0), m_servClientSocket(NULL), m_servClientTimeout(NULL), m_loopTimer(NULL), m_pollTimer(NULL), m_config(static_cast(parent)->m_config), m_database(NULL), m_databaseStationsCursor(NULL), m_databaseServicesCursor(NULL), m_databaseServiceTypesCursor(NULL), m_databasePermissionsCursor(NULL), m_databaseActivityCursor(NULL), m_databaseStatisticsCursor(NULL), m_databaseStatusCursor(NULL) { + // Read settings + m_config->setGroup("Tuning"); + m_pollInterval = m_config->readNumEntry("pollInterval", m_pollInterval); // Initialize timers m_kerberosInitTimer = new TQTimer(); @@ -392,7 +395,7 @@ void AuthSocket::commandLoop() { if (m_loopTimer) m_loopTimer->start(0, TRUE); } else { - if (m_loopTimer) m_loopTimer->start(100, TRUE); + if (m_loopTimer) m_loopTimer->start(m_pollInterval, TRUE); } return; } @@ -692,7 +695,7 @@ void AuthSocket::commandLoop() { if (m_loopTimer) m_loopTimer->start(0, TRUE); } else { - if (m_loopTimer) m_loopTimer->start(100, TRUE); + if (m_loopTimer) m_loopTimer->start(m_pollInterval, TRUE); } return; } -- cgit v1.2.1