summaryrefslogtreecommitdiffstats
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/auth_server_lin/src/auth_conn.cpp17
-rw-r--r--servers/auth_server_lin/src/auth_conn.h2
-rw-r--r--servers/fpga_server_lin/src/fpga_conn.cpp16
-rw-r--r--servers/fpga_server_lin/src/fpga_conn.h2
4 files changed, 29 insertions, 8 deletions
diff --git a/servers/auth_server_lin/src/auth_conn.cpp b/servers/auth_server_lin/src/auth_conn.cpp
index 177a0e3..29b8501 100644
--- a/servers/auth_server_lin/src/auth_conn.cpp
+++ b/servers/auth_server_lin/src/auth_conn.cpp
@@ -45,7 +45,7 @@ struct exit_exception {
instance of this class.
*/
AuthSocket::AuthSocket(int sock, TQObject *parent, const char *name) :
- TDEKerberosServerSocket(parent, name), m_criticalSection(0), m_stationID(-1), m_bound(false), m_servActive(false), m_servState(0), m_servClientSocket(NULL), m_servClientTimeout(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_servActive(false), m_servState(0), m_servClientSocket(NULL), m_servClientTimeout(NULL), m_loopTimer(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)
{
@@ -61,6 +61,11 @@ AuthSocket::AuthSocket(int sock, TQObject *parent, const char *name) :
}
AuthSocket::~AuthSocket() {
+ if (m_loopTimer) {
+ m_loopTimer->stop();
+ delete m_loopTimer;
+ m_loopTimer = NULL;
+ }
if (m_databaseStationsCursor) {
delete m_databaseStationsCursor;
}
@@ -260,7 +265,7 @@ void AuthSocket::servLoop() {
void AuthSocket::commandLoop() {
if (m_servActive) {
servLoop();
- TQTimer::singleShot(0, this, SLOT(commandLoop()));
+ if (m_loopTimer) m_loopTimer->start(0, TRUE);
return;
}
@@ -427,7 +432,7 @@ void AuthSocket::commandLoop() {
}
m_criticalSection--;
- TQTimer::singleShot(0, this, SLOT(commandLoop()));
+ if (m_loopTimer) m_loopTimer->start(0, TRUE);
return;
}
}
@@ -438,7 +443,11 @@ void AuthSocket::commandLoop() {
}
int AuthSocket::enterCommandLoop() {
- TQTimer::singleShot(0, this, SLOT(commandLoop()));
+ if (!m_loopTimer) {
+ m_loopTimer = new TQTimer();
+ connect(m_loopTimer, SIGNAL(timeout()), this, SLOT(commandLoop()));
+ }
+ if (m_loopTimer) m_loopTimer->start(0, TRUE);
return 0;
}
diff --git a/servers/auth_server_lin/src/auth_conn.h b/servers/auth_server_lin/src/auth_conn.h
index f1b3295..08f8072 100644
--- a/servers/auth_server_lin/src/auth_conn.h
+++ b/servers/auth_server_lin/src/auth_conn.h
@@ -74,6 +74,8 @@ class AuthSocket : public TDEKerberosServerSocket
TQString m_srvServiceHostName;
int m_srvServicePort;
+ TQTimer* m_loopTimer;
+
KSimpleConfig* m_config;
TQSqlDatabase* m_database;
TQSqlCursor* m_databaseStationsCursor;
diff --git a/servers/fpga_server_lin/src/fpga_conn.cpp b/servers/fpga_server_lin/src/fpga_conn.cpp
index f0ab39d..6f4cecf 100644
--- a/servers/fpga_server_lin/src/fpga_conn.cpp
+++ b/servers/fpga_server_lin/src/fpga_conn.cpp
@@ -57,7 +57,7 @@ struct exit_exception {
instance of this class.
*/
FPGASocket::FPGASocket(int sock, TQObject *parent, const char *name) :
- TDEKerberosServerSocket(parent, name), m_criticalSection(0), m_config(static_cast<FPGAServer*>(parent)->m_config) {
+ TDEKerberosServerSocket(parent, name), m_criticalSection(0), m_loopTimer(NULL), m_config(static_cast<FPGAServer*>(parent)->m_config) {
setServiceName("remotefpga");
@@ -68,7 +68,11 @@ FPGASocket::FPGASocket(int sock, TQObject *parent, const char *name) :
}
FPGASocket::~FPGASocket() {
- //
+ if (m_loopTimer) {
+ m_loopTimer->stop();
+ delete m_loopTimer;
+ m_loopTimer = NULL;
+ }
}
void FPGASocket::close() {
@@ -177,7 +181,7 @@ void FPGASocket::commandLoop() {
}
}
m_criticalSection--;
- TQTimer::singleShot(0, this, SLOT(commandLoop()));
+ if (m_loopTimer) m_loopTimer->start(0, TRUE);
return;
}
catch (...) {
@@ -187,7 +191,11 @@ void FPGASocket::commandLoop() {
}
int FPGASocket::enterCommandLoop() {
- TQTimer::singleShot(0, this, SLOT(commandLoop()));
+ if (!m_loopTimer) {
+ m_loopTimer = new TQTimer();
+ connect(m_loopTimer, SIGNAL(timeout()), this, SLOT(commandLoop()));
+ }
+ if (m_loopTimer) m_loopTimer->start(0, TRUE);
return 0;
}
diff --git a/servers/fpga_server_lin/src/fpga_conn.h b/servers/fpga_server_lin/src/fpga_conn.h
index 8c99794..717a35b 100644
--- a/servers/fpga_server_lin/src/fpga_conn.h
+++ b/servers/fpga_server_lin/src/fpga_conn.h
@@ -62,6 +62,8 @@ class FPGASocket : public TDEKerberosServerSocket
TQString m_remoteHost;
int m_fd_tty;
+ TQTimer* m_loopTimer;
+
KSimpleConfig* m_config;
friend class FPGAServer;