]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ftp.cpp
Fix bug in which splitter would not close if sash pulled to one edge
[wxWidgets.git] / src / common / ftp.cpp
index 9ef749df6f648bb2eba0a7a0f4a2d7ace0de957a..fddfb1d1851c35fa39be367fb3973e34d5cccf36 100644 (file)
@@ -60,16 +60,13 @@ IMPLEMENT_PROTOCOL(wxFTP, _T("ftp"), _T("ftp"), TRUE)
 wxFTP::wxFTP()
   : wxProtocol()
 {
-  wxChar tmp[256];
-
   m_lastError = wxPROTO_NOERR;
   m_streaming = FALSE;
 
   m_user = _T("anonymous");
-  wxGetUserName(tmp, 256);
-  m_passwd.sprintf(_T("%s@"),tmp);
-  wxGetHostName(tmp, 256);
-  m_passwd += tmp;
+  m_passwd = wxGetUserId();
+  m_passwd += '@';
+  m_passwd += wxGetHostName();
 
   SetNotify(0);
 }
@@ -155,7 +152,7 @@ bool wxFTP::SendCommand(const wxString& command, char exp_ret)
     return FALSE;
   }
   tmp_str = command + _T("\r\n");
-  wxWX2MBbuf tmp_buf = tmp_str.mb_str();
+  const wxWX2MBbuf tmp_buf = tmp_str.mb_str();
   if (Write(MBSTRINGCAST tmp_buf, strlen(tmp_buf)).Error()) {
     m_lastError = wxPROTO_NETERR;
     return FALSE;
@@ -404,9 +401,12 @@ wxList *wxFTP::GetList(const wxString& wildcard)
     return NULL;
   }
 
+  // Ininterresting ?!
+  /*
   sock->SetEventHandler(*GetNextHandler(), m_id);
   sock->Notify(m_notifyme);
   sock->SetNotify(m_neededreq);
+  */
 
   return file_list;
 }