hide login passwords from server log; call logDebugMessage in S_PH thread instead of Server thread

This commit is contained in:
Max-Wilhelm Bruker 2012-06-03 19:23:15 +02:00
parent 2a5050fdc4
commit 80439762cf
7 changed files with 20 additions and 11 deletions

View file

@ -163,7 +163,6 @@ int main(int argc, char *argv[])
testHash();
Servatrice *server = new Servatrice(settings);
QObject::connect(server, SIGNAL(logDebugMessage(QString, void *)), logger, SLOT(logMessage(QString, void *)));
QObject::connect(server, SIGNAL(destroyed()), &app, SLOT(quit()), Qt::QueuedConnection);
int retval = 0;
if (server->initServer()) {

View file

@ -197,6 +197,11 @@ void ServerSocketInterface::transmitProtocolItem(const ServerMessage &item)
emit outputBufferChanged();
}
void ServerSocketInterface::logDebugMessage(const QString &message)
{
logger->logMessage(message, this);
}
Response::ResponseCode ServerSocketInterface::processExtendedSessionCommand(int cmdType, const SessionCommand &cmd, ResponseContainer &rc)
{
switch ((SessionCommand::SessionCommandType) cmdType) {

View file

@ -57,6 +57,8 @@ private slots:
void flushOutputBuffer();
signals:
void outputBufferChanged();
protected:
void logDebugMessage(const QString &message);
private:
QMutex outputBufferMutex;
Servatrice *servatrice;