changed a lot of thread locking code in the server, rooms are working with ISL now

This commit is contained in:
Max-Wilhelm Bruker 2012-03-17 16:09:00 +01:00
parent 572e4eaafa
commit c23af44749
16 changed files with 449 additions and 221 deletions

View file

@ -14,10 +14,11 @@ class Server_ProtocolHandler;
class ServerLogger : public QObject {
Q_OBJECT
public:
ServerLogger(const QString &logFileName, QObject *parent = 0);
ServerLogger(QObject *parent = 0);
~ServerLogger();
static void hupSignalHandler(int unused);
public slots:
void startLog(const QString &logFileName);
void logMessage(QString message, void *caller = 0);
private slots:
void handleSigHup();
@ -33,19 +34,4 @@ private:
QMutex bufferMutex;
};
class ServerLoggerThread : public QThread {
Q_OBJECT
private:
QString fileName;
ServerLogger *logger;
QWaitCondition initWaitCondition;
protected:
void run();
public:
ServerLoggerThread(const QString &_fileName, QObject *parent = 0);
~ServerLoggerThread();
ServerLogger *getLogger() const { return logger; }
void waitForInit();
};
#endif