race condition fixed

This commit is contained in:
Max-Wilhelm Bruker 2011-04-13 03:08:44 +02:00
parent 091a2ed6b2
commit 7ae0e31964
7 changed files with 3 additions and 15 deletions

View file

@ -30,7 +30,6 @@
void Servatrice_TcpServer::incomingConnection(int socketDescriptor)
{
ServerSocketThread *sst = new ServerSocketThread(socketDescriptor, server, this);
connect(sst, SIGNAL(clientAdded(ServerSocketInterface *)), this, SIGNAL(clientAdded(ServerSocketInterface *)));
sst->start();
}
@ -57,7 +56,6 @@ Servatrice::Servatrice(QSettings *_settings, QObject *parent)
}
tcpServer = new Servatrice_TcpServer(this);
connect(tcpServer, SIGNAL(clientAdded(ServerSocketInterface *)), this, SLOT(newConnection(ServerSocketInterface *)));
int port = settings->value("server/port", 4747).toInt();
qDebug() << "Starting server on port" << port;
tcpServer->listen(QHostAddress::Any, port);
@ -154,11 +152,6 @@ bool Servatrice::execSqlQuery(QSqlQuery &query)
return false;
}
void Servatrice::newConnection(ServerSocketInterface *client)
{
addClient(client);
}
AuthenticationResult Servatrice::checkUserPassword(const QString &user, const QString &password)
{
QMutexLocker locker(&dbMutex);