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);
}
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;
in_stream->m_ftpsize = wxAtoi(WXSTRINGCAST str_size);
}
+ sock->SetFlags(WAITALL);
return in_stream;
}
return NULL;
}
- sock->SetEventHandler(*GetNextHandler(), m_id);
- sock->Notify(m_notifyme);
- sock->SetNotify(m_neededreq);
-
return file_list;
}
#endif