From 4e963c3cabac1792023ef8b812b5f70623238b33 Mon Sep 17 00:00:00 2001 From: Eli de Faria Junior Date: Mon, 13 Oct 2014 15:45:43 -0300 Subject: [PATCH] conserto de bugs --- cacic-daemon/cacicD/cacictimer.cpp | 10 +--------- src/ccoleta.cpp | 3 ++- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cacic-daemon/cacicD/cacictimer.cpp b/cacic-daemon/cacicD/cacictimer.cpp index 7e8fba7..693bce2 100644 --- a/cacic-daemon/cacicD/cacictimer.cpp +++ b/cacic-daemon/cacicD/cacictimer.cpp @@ -66,15 +66,6 @@ void CacicTimer::mslot(){ cacicthread->setCMutex(cMutex); cacicthread->setModuloDirPath(getDirProgram()); cacicthread->start(QThread::NormalPriority); - // if(nome == "gercols" ){ - // //Envio do json gerado na coleta - // bool ok = false; - // QJsonObject jsonColeta = ccacic->getJsonFromFile(this->applicationDirPath + "/coleta.json"); - // OCacicComm->comm("/ws/neo/coleta", &ok, jsonColeta , false); - // if(&ok){ - // QLogger::QLog_Info("Cacic Daemon (Timer)", QString("coleta enviada com sucesso.")); - // } - // } }else{ QLogger::QLog_Error("Cacic Daemon (Timer)", "Falha na obtenção do arquivo de configuração."); } @@ -89,6 +80,7 @@ bool CacicTimer::verificarEIniciarQMutex(){ if(!cacicthread->isRunning()){ cMutex->lock(); QLogger::QLog_Info("Cacic Daemon (Timer)", "Semáforo fechado com sucesso."); + return true; }else{ QLogger::QLog_Info("Cacic Daemon (Timer)", "Possivelmente o gercols travou e será finalizado."); try{ diff --git a/src/ccoleta.cpp b/src/ccoleta.cpp index e9bd6a8..920f9f9 100644 --- a/src/ccoleta.cpp +++ b/src/ccoleta.cpp @@ -7,11 +7,11 @@ CColeta::CColeta(QObject *parent) void CColeta::coletaHardware() { - qDebug() << "coletaHardware() começando sua execução"; oHardware.iniciaColeta(); qDebug() << "coletaHardware() executado"; emit hardwareFinish(); + emit beginSoftware(); } @@ -28,6 +28,7 @@ void CColeta::configuraColetas(){ QObject::connect(this, SIGNAL(beginSoftware()), this, SLOT(coletaSoftware())); QObject::connect(this, SIGNAL(softwareFinish()), this, SLOT(softwareReady())); QObject::connect(this, SIGNAL(hardwareFinish()), this, SLOT(hardwareReady())); + emit beginHardware(); } bool CColeta::waitToCollect() -- libgit2 0.21.2