Correction verification si un transfert SFTP est en cours avant d'en lancer un nouveau
This commit is contained in:
parent
707c6bb4d9
commit
ff22a4ea3e
@ -61,7 +61,11 @@ int CSFTPServerManager::TransferTrainLogToSFTPServer(QString FileName, bool Dete
|
|||||||
{
|
{
|
||||||
return RET_ERROR;
|
return RET_ERROR;
|
||||||
}
|
}
|
||||||
|
if(mTransferProcess->state() != QProcess::NotRunning)
|
||||||
|
{
|
||||||
|
CEngLog::instance()->AddLogString("Copie de fichier log avortée car QProcess roule");
|
||||||
|
return RET_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString DestFilePath = FileName;
|
QString DestFilePath = FileName;
|
||||||
@ -116,11 +120,7 @@ int CSFTPServerManager::TransferTrainLogToSFTPServer(QString FileName, bool Dete
|
|||||||
|
|
||||||
// qDebug("Commande pour copie du fichier log: %s",qPrintable(Cmd));
|
// qDebug("Commande pour copie du fichier log: %s",qPrintable(Cmd));
|
||||||
|
|
||||||
if(mTransferProcess->state() != QProcess::NotRunning)
|
|
||||||
{
|
|
||||||
CEngLog::instance()->AddLogString("Copie de fichier log avortée car QProcess roule");
|
|
||||||
return RET_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
mTransferProcess->start(Cmd);
|
mTransferProcess->start(Cmd);
|
||||||
mProcessTimer->start(SFTP_PROCESS_TIMEOUT); //Allow some time to copy the file
|
mProcessTimer->start(SFTP_PROCESS_TIMEOUT); //Allow some time to copy the file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user