Commit abe2505652edbdb63d23cce9c81727788548abf5
1 parent
7e25af70
Exists in
master
and in
1 other branch
Pequenas correções
Showing
5 changed files
with
7 additions
and
3 deletions
Show diff stats
extrator/src/extratorSRT.cpp
extrator/src/extratorTXT.cpp
... | ... | @@ -92,7 +92,7 @@ void ExtratorTXT::Run(){ |
92 | 92 | } |
93 | 93 | }catch (EOFException &ex){ |
94 | 94 | if(line_index == 0) |
95 | - notifyListeners((unsigned char*)"ARQUIVO_VAZIO"); | |
95 | + notifyListeners((unsigned char*)"ARQUIVO_INVALIDO"); | |
96 | 96 | hasNext = false; |
97 | 97 | }catch (...){ |
98 | 98 | Util::Logger::Instance()->writeLog((char*) "[ERRO: extratorTXT.cpp] Erro durante a leitura do arquivo de texto."); | ... | ... |
recognize/src/recognize.cpp
servico/src/serviceWindowGenerationFromRec.cpp
... | ... | @@ -64,6 +64,7 @@ void ServiceWindowGenerationFromRec::setPathContents(){ |
64 | 64 | ifstream conf_file(PATH_CONF_FILE, ifstream::binary); |
65 | 65 | parsingSuccessful = reader.parse(conf_file, root); |
66 | 66 | if(!parsingSuccessful){ |
67 | + conf_file.close(); | |
67 | 68 | throw ServiceException("Fail to parsing param.json"); |
68 | 69 | } |
69 | 70 | string attr = root.get("storage", PATH_VBOX_UPLOADS).asString(); |
... | ... | @@ -71,6 +72,7 @@ void ServiceWindowGenerationFromRec::setPathContents(){ |
71 | 72 | strcpy(this->path_contents, attr.c_str()); |
72 | 73 | this->path_uploads = PATH_VBOX_UPLOADS; |
73 | 74 | rec->setPathAudioContents(path_uploads); |
75 | + conf_file.close(); | |
74 | 76 | }else{ |
75 | 77 | throw ServiceException("Invalid client!"); |
76 | 78 | } | ... | ... |
servico/src/serviceWindowGenerationFromSRT.cpp
... | ... | @@ -67,12 +67,14 @@ void ServiceWindowGenerationFromSRT::setPathContents() { |
67 | 67 | ifstream conf_file(PATH_CONF_FILE, ifstream::binary); |
68 | 68 | parsingSuccessful = reader.parse(conf_file, root); |
69 | 69 | if(!parsingSuccessful){ |
70 | + conf_file.close(); | |
70 | 71 | throw ServiceException("Fail to parsing param.json"); |
71 | 72 | } |
72 | 73 | string attr = root.get("storage", PATH_VBOX_UPLOADS).asString(); |
73 | 74 | this->path_contents = new char[MAX_SIZE_PATH]; |
74 | 75 | strcpy(this->path_contents, attr.c_str()); |
75 | 76 | this->path_uploads = PATH_VBOX_UPLOADS; |
77 | + conf_file.close(); | |
76 | 78 | }else{ |
77 | 79 | throw ServiceException("Invalid client!"); |
78 | 80 | } | ... | ... |