summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Connection.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-04 08:55:48 +0200
committermadmaxoft <github@xoft.cz>2014-04-04 08:55:48 +0200
commit446a6515029e66b1f76358dcee1ccfe59c432bdd (patch)
tree8635f884130e06999a2ba7908b3715cde540d316 /Tools/ProtoProxy/Connection.cpp
parentAPIDump: Added angular specifics. (diff)
downloadcuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.tar
cuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.tar.gz
cuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.tar.bz2
cuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.tar.lz
cuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.tar.xz
cuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.tar.zst
cuberite-446a6515029e66b1f76358dcee1ccfe59c432bdd.zip
Diffstat (limited to 'Tools/ProtoProxy/Connection.cpp')
-rw-r--r--Tools/ProtoProxy/Connection.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp
index f02b503f1..d9b8e3dd1 100644
--- a/Tools/ProtoProxy/Connection.cpp
+++ b/Tools/ProtoProxy/Connection.cpp
@@ -387,6 +387,8 @@ bool cConnection::RelayFromServer(void)
return CLIENTSEND(Buffer, res);
}
}
+ ASSERT(!"Unhandled server state while relaying from server");
+ return false;
}
@@ -423,6 +425,8 @@ bool cConnection::RelayFromClient(void)
return SERVERSEND(Buffer, res);
}
}
+ ASSERT(!"Unhandled server state while relaying from client");
+ return false;
}
@@ -438,11 +442,11 @@ double cConnection::GetRelativeTime(void)
-bool cConnection::SendData(SOCKET a_Socket, const char * a_Data, int a_Size, const char * a_Peer)
+bool cConnection::SendData(SOCKET a_Socket, const char * a_Data, size_t a_Size, const char * a_Peer)
{
- DataLog(a_Data, a_Size, "Sending data to %s, %d bytes", a_Peer, a_Size);
+ DataLog(a_Data, a_Size, "Sending data to %s, %u bytes", a_Peer, (unsigned)a_Size);
- int res = send(a_Socket, a_Data, a_Size, 0);
+ int res = send(a_Socket, a_Data, (int)a_Size, 0);
if (res <= 0)
{
Log("%s closed the socket: %d, %d; aborting connection", a_Peer, res, SocketError);