]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/sockets/baseclient.cpp
Correct placement of calling convention keyword: must follow the return type.
[wxWidgets.git] / samples / sockets / baseclient.cpp
index 22fe8f1ae997d42cf04fb8071c8f4af8128cf9ed..1736b3b9692c5ade7d4d9e2255e99fb33eead621 100644 (file)
@@ -325,7 +325,7 @@ Client::CreateBuffer(int* msgsize)
         //returned buffer will contain test indicator, message size in kb and data
         bufsize = size*1024+2;
         buf = new char[bufsize];
-        buf[0] = (char)0xDE; //second byte contains size in kilobytes
+        buf[0] = (unsigned char)0xDE; //second byte contains size in kilobytes
         buf[1] = (char)(size);
         *msgsize = size*1024;
     }
@@ -334,7 +334,7 @@ Client::CreateBuffer(int* msgsize)
         //returned buffer will contain test indicator, message size in kb and data
         bufsize = (*msgsize)+2;
         buf = new char[bufsize];
-        buf[0] = (char)0xBE; //second byte contains size in bytes
+        buf[0] = (unsigned char)0xBE; //second byte contains size in bytes
         buf[1] = (char)(*msgsize);
     }
     return buf;
@@ -614,7 +614,9 @@ EventWorker::OnSocketEvent(wxSocketEvent& pEvent) {
             //wxLogMessage(wxT("EventWorker: got connection"));
             wxLogMessage(wxT("%s: starting writing message (2 bytes for signature and %d bytes of data to write)"),CreateIdent(m_localaddr).c_str(),m_outsize-2);
             if (!m_clientSocket->GetLocal(m_localaddr))
+            {
                 wxLogError(_("Cannot get peer data for socket %p"),m_clientSocket);
+            }
             m_currentType = WorkerEvent::SENDING;
             wxLogDebug(wxT("%s: CONNECTING"),CreateIdent(m_localaddr).c_str());
             SendEvent(false);