From abe2505652edbdb63d23cce9c81727788548abf5 Mon Sep 17 00:00:00 2001 From: Wesnydy Ribeiro Date: Tue, 16 Jun 2015 08:21:23 -0300 Subject: [PATCH] Pequenas correções --- extrator/src/extratorSRT.cpp | 2 +- extrator/src/extratorTXT.cpp | 2 +- recognize/src/recognize.cpp | 2 +- servico/src/serviceWindowGenerationFromRec.cpp | 2 ++ servico/src/serviceWindowGenerationFromSRT.cpp | 2 ++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/extrator/src/extratorSRT.cpp b/extrator/src/extratorSRT.cpp index b7b77dc..670e6c9 100644 --- a/extrator/src/extratorSRT.cpp +++ b/extrator/src/extratorSRT.cpp @@ -87,7 +87,7 @@ void ExtratorSRT::Run(){ free(subtitle); } if(sub_index == 0) - notifyListeners((unsigned char*)"ARQUIVO_VAZIO", 0); + notifyListeners((unsigned char*)"ARQUIVO_INVALIDO", 0); finish = true; notifyEndExtraction(sub_index); } diff --git a/extrator/src/extratorTXT.cpp b/extrator/src/extratorTXT.cpp index a8e57b9..e36d87d 100644 --- a/extrator/src/extratorTXT.cpp +++ b/extrator/src/extratorTXT.cpp @@ -92,7 +92,7 @@ void ExtratorTXT::Run(){ } }catch (EOFException &ex){ if(line_index == 0) - notifyListeners((unsigned char*)"ARQUIVO_VAZIO"); + notifyListeners((unsigned char*)"ARQUIVO_INVALIDO"); hasNext = false; }catch (...){ Util::Logger::Instance()->writeLog((char*) "[ERRO: extratorTXT.cpp] Erro durante a leitura do arquivo de texto."); diff --git a/recognize/src/recognize.cpp b/recognize/src/recognize.cpp index 5be255e..353fb57 100644 --- a/recognize/src/recognize.cpp +++ b/recognize/src/recognize.cpp @@ -209,7 +209,7 @@ void Recognize::breakVideoParts(int timeTotal) { void Recognize::executeJuliusEngine() { string type, freqStr; - string command = "julius - C "; + string command = "julius -C "; char cfreq[10]; char* jPath; diff --git a/servico/src/serviceWindowGenerationFromRec.cpp b/servico/src/serviceWindowGenerationFromRec.cpp index c506130..8dada47 100644 --- a/servico/src/serviceWindowGenerationFromRec.cpp +++ b/servico/src/serviceWindowGenerationFromRec.cpp @@ -64,6 +64,7 @@ void ServiceWindowGenerationFromRec::setPathContents(){ ifstream conf_file(PATH_CONF_FILE, ifstream::binary); parsingSuccessful = reader.parse(conf_file, root); if(!parsingSuccessful){ + conf_file.close(); throw ServiceException("Fail to parsing param.json"); } string attr = root.get("storage", PATH_VBOX_UPLOADS).asString(); @@ -71,6 +72,7 @@ void ServiceWindowGenerationFromRec::setPathContents(){ strcpy(this->path_contents, attr.c_str()); this->path_uploads = PATH_VBOX_UPLOADS; rec->setPathAudioContents(path_uploads); + conf_file.close(); }else{ throw ServiceException("Invalid client!"); } diff --git a/servico/src/serviceWindowGenerationFromSRT.cpp b/servico/src/serviceWindowGenerationFromSRT.cpp index 080e920..6e940e0 100644 --- a/servico/src/serviceWindowGenerationFromSRT.cpp +++ b/servico/src/serviceWindowGenerationFromSRT.cpp @@ -67,12 +67,14 @@ void ServiceWindowGenerationFromSRT::setPathContents() { ifstream conf_file(PATH_CONF_FILE, ifstream::binary); parsingSuccessful = reader.parse(conf_file, root); if(!parsingSuccessful){ + conf_file.close(); throw ServiceException("Fail to parsing param.json"); } string attr = root.get("storage", PATH_VBOX_UPLOADS).asString(); this->path_contents = new char[MAX_SIZE_PATH]; strcpy(this->path_contents, attr.c_str()); this->path_uploads = PATH_VBOX_UPLOADS; + conf_file.close(); }else{ throw ServiceException("Invalid client!"); } -- libgit2 0.21.2