Browse Source

Improving logging of FTP transfer failures (2nd)

Source commit: 58fcc5e5b155ade8291261ccf8fcf6fc549298b3
Martin Prikryl 5 years ago
parent
commit
18d386923d
2 changed files with 16 additions and 0 deletions
  1. 11 0
      source/filezilla/FtpControlSocket.cpp
  2. 5 0
      source/filezilla/TransferSocket.cpp

+ 11 - 0
source/filezilla/FtpControlSocket.cpp

@@ -3752,6 +3752,17 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
       }
       break;
     case FILETRANSFER_WAITFINISH:
+      if (bFinish)
+      {
+        if (nError)
+        {
+          LogMessage(FZ_LOG_INFO, L"Transfer completed");
+        }
+        else
+        {
+          LogMessage(FZ_LOG_INFO, L"Transfer failed");
+        }
+      }
       if (!bFinish)
       {
         if (code == 1)

+ 5 - 0
source/filezilla/TransferSocket.cpp

@@ -1129,8 +1129,13 @@ void CTransferSocket::EnsureSendClose(int Mode)
   {
     if (Mode != 0)
     {
+      m_pOwner->ShowStatus(L"Data connection failed", FZ_LOG_INFO);
       m_nMode |= Mode;
     }
+    else
+    {
+      m_pOwner->ShowStatus(L"Data connection closed", FZ_LOG_INFO);
+    }
     m_bSentClose = TRUE;
     DebugCheck(m_pOwner->m_pOwner->PostThreadMessage(m_nInternalMessageID, FZAPI_THREADMSG_TRANSFEREND, m_nMode));
   }