]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ftp.cpp
Added wxVector::swap().
[wxWidgets.git] / src / common / ftp.cpp
index add0e8392abc7515ca1cf90cb37182960d6450d1..235a29d3db85981622f0c258fffe81c482eef0ee 100644 (file)
@@ -245,7 +245,6 @@ char wxFTP::SendCommand(const wxString& command)
         return 0;
     }
 
-#ifdef __WXDEBUG__
     // don't show the passwords in the logs (even in debug ones)
     wxString cmd, password;
     if ( command.Upper().StartsWith(_T("PASS "), &password) )
@@ -257,8 +256,7 @@ char wxFTP::SendCommand(const wxString& command)
         cmd = command;
     }
 
-    wxLogTrace(FTP_TRACE_MASK, _T("==> %s"), cmd.c_str());
-#endif // __WXDEBUG__
+    LogRequest(cmd);
 
     m_lastError = wxPROTO_NOERR;
     return GetResult();
@@ -301,6 +299,8 @@ char wxFTP::GetResult()
             return 0;
         }
 
+        LogResponse(line);
+
         if ( !m_lastResult.empty() )
         {
             // separate from last line
@@ -317,11 +317,6 @@ char wxFTP::GetResult()
             {
                 badReply = true;
             }
-            else
-            {
-                wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"),
-                           code.c_str(), line.c_str());
-            }
         }
         else // line has at least 4 chars
         {
@@ -331,8 +326,6 @@ char wxFTP::GetResult()
             if ( firstLine )
             {
                 code = wxString(line, LEN_CODE);
-                wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"),
-                           code.c_str(), line.c_str() + LEN_CODE + 1);
 
                 switch ( chMarker )
                 {
@@ -357,15 +350,6 @@ char wxFTP::GetResult()
                     {
                         endOfReply = true;
                     }
-
-                    wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"),
-                               code.c_str(), line.c_str() + LEN_CODE + 1);
-                }
-                else
-                {
-                    // just part of reply
-                    wxLogTrace(FTP_TRACE_MASK, _T("<== %s %s"),
-                               code.c_str(), line.c_str());
                 }
             }
         }
@@ -728,7 +712,7 @@ public:
 
     wxFTP *m_ftp;
 
-    DECLARE_NO_COPY_CLASS(wxInputFTPStream)
+    wxDECLARE_NO_COPY_CLASS(wxInputFTPStream);
 };
 
 class wxOutputFTPStream : public wxSocketOutputStream
@@ -764,7 +748,7 @@ public:
 
     wxFTP *m_ftp;
 
-    DECLARE_NO_COPY_CLASS(wxOutputFTPStream)
+    wxDECLARE_NO_COPY_CLASS(wxOutputFTPStream);
 };
 
 wxInputStream *wxFTP::GetInputStream(const wxString& path)
@@ -1008,8 +992,7 @@ int wxFTP::GetFileSize(const wxString& fileName)
                                           &filesize) != 9 )
                             {
                                 // Hmm... Invalid response
-                                wxLogTrace(FTP_TRACE_MASK,
-                                           _T("Invalid LIST response"));
+                                wxLogDebug(wxT("Invalid LIST response"));
                             }
                         }
                         else // Windows-style response (?)
@@ -1019,8 +1002,7 @@ int wxFTP::GetFileSize(const wxString& fileName)
                                           &filesize) != 4 )
                             {
                                 // something bad happened..?
-                                wxLogTrace(FTP_TRACE_MASK,
-                                           _T("Invalid or unknown LIST response"));
+                                wxLogDebug(wxT("Invalid or unknown LIST response"));
                             }
                         }
                     }