summaryrefslogtreecommitdiffstats
path: root/servers/auth_server_lin
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-10-29 17:11:18 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-10-29 17:11:18 -0500
commit145c83d1b310439d2aa39f52a49a5812f7c14102 (patch)
tree0d19dfc4a207d51844337c685638a22df5bcb9b2 /servers/auth_server_lin
parentff484b9d9c9a3562eab1c4a72ac7cada5a4d0b14 (diff)
downloadulab-145c83d1b310439d2aa39f52a49a5812f7c14102.tar.gz
ulab-145c83d1b310439d2aa39f52a49a5812f7c14102.zip
Add ability to tune polling speed
Diffstat (limited to 'servers/auth_server_lin')
-rw-r--r--servers/auth_server_lin/src/auth_conn.cpp9
-rw-r--r--servers/auth_server_lin/src/auth_conn.h5
2 files changed, 9 insertions, 5 deletions
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<AuthServer*>(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<AuthServer*>(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;
}
diff --git a/servers/auth_server_lin/src/auth_conn.h b/servers/auth_server_lin/src/auth_conn.h
index 612b671..7cf3ef9 100644
--- a/servers/auth_server_lin/src/auth_conn.h
+++ b/servers/auth_server_lin/src/auth_conn.h
@@ -64,7 +64,7 @@ class AuthSocket : public TDEKerberosServerSocket
private:
void updateStatistics(int eventType);
-
+
private:
int line;
int m_criticalSection;
@@ -73,6 +73,7 @@ class AuthSocket : public TDEKerberosServerSocket
bool m_bound;
int m_serviceID;
int m_serverID;
+ int m_pollInterval;
TQ_ULLONG m_terminationStamp;
bool m_servActive;
@@ -127,4 +128,4 @@ class AuthServer : public TQServerSocket
friend class AuthSocket;
-}; \ No newline at end of file
+};