]> git.saurik.com Git - wxWidgets.git/commitdiff
Stupid bug: using LastError() instead of Error()
authorGuillermo Rodriguez Garcia <guille@iies.es>
Wed, 9 Feb 2000 22:53:26 +0000 (22:53 +0000)
committerGuillermo Rodriguez Garcia <guille@iies.es>
Wed, 9 Feb 2000 22:53:26 +0000 (22:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/protocol.cpp

index eab8724ef458e123747f766ea5b1760a1b28a810..542752e318a1059446724592b96ceba8eab1cbc1 100644 (file)
@@ -69,7 +69,8 @@ bool wxProtocol::Reconnect()
 {
   wxIPV4address addr;
 
-  if (!GetPeer(addr)) {
+  if (!GetPeer(addr))
+  {
     Close();
     return FALSE;
   }
@@ -77,6 +78,7 @@ bool wxProtocol::Reconnect()
     return FALSE;
   if (!Connect(addr))
     return FALSE;
+
   return TRUE;
 }
 
@@ -88,7 +90,7 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) {
   bool found;
 
   avail = sock->Read(tmp_buf, PROTO_BSIZE).LastCount();
-  if (sock->LastError() != 0 || avail == 0)
+  if (sock->Error() || avail == 0)
     return wxPROTO_NETERR;
 
   memcpy(tmp_str, tmp_buf, avail);