X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/684dface9a4b18f4e51bf734a881c9cdf0610675..068b764a5a7cc2929b1fd8ea5643f43b5cbc8762:/src/common/protocol.cpp diff --git a/src/common/protocol.cpp b/src/common/protocol.cpp index 42b770e55d..e1933a2e20 100644 --- a/src/common/protocol.cpp +++ b/src/common/protocol.cpp @@ -45,8 +45,12 @@ wxProtoInfo::wxProtoInfo(const wxChar *name, const wxChar *serv, { m_cinfo = info; m_needhost = need_host1; +#if wxUSE_URL next = wxURL::ms_protocols; wxURL::ms_protocols = this; +#else + next = NULL; +#endif } ///////////////////////////////////////////////////////////////// @@ -74,16 +78,16 @@ bool wxProtocol::Reconnect() if (!GetPeer(addr)) { Close(); - return FALSE; + return false; } if (!Close()) - return FALSE; - + return false; + if (!Connect(addr)) - return FALSE; + return false; - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -184,17 +188,17 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) // Not implemented on all systems // ret = (char *)memccpy(tmp_str, tmp_buf, '\n', avail); - found = FALSE; + found = false; for (ret=tmp_str;ret < (tmp_str+avail); ret++) - if (*ret == '\n') + if (*ret == '\n') { - found = TRUE; + found = true; break; } if (!found) return wxPROTO_PROTERR; - + *ret = 0; result = wxString::FromAscii( tmp_str ); @@ -202,7 +206,7 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) size = ret-tmp_str+1; sock->Unread(&tmp_buf[size], avail-size); - + return wxPROTO_NOERR; #undef PROTO_BSIZE }