aboutsummaryrefslogtreecommitdiff
path: root/src/communication.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-07-01 20:41:31 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-07-01 20:41:31 -0300
commitaaf198773fd8e041b0976cc0682e83f8acf394d0 (patch)
tree5fcf0b6b1b927dda842ae98b041463cdafd14126 /src/communication.cc
parent11ae3d0e42293d01b4d729ed5b6fceb8f0ec3fa5 (diff)
downloadgame-aaf198773fd8e041b0976cc0682e83f8acf394d0.tar.gz
game-aaf198773fd8e041b0976cc0682e83f8acf394d0.zip
beginning of `query.cc`
Diffstat (limited to 'src/communication.cc')
-rw-r--r--src/communication.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/communication.cc b/src/communication.cc
index 99c891a..bb71327 100644
--- a/src/communication.cc
+++ b/src/communication.cc
@@ -273,11 +273,11 @@ bool WriteToSocket(TConnection *Connection, uint8 *Buffer, int Size){
int BytesToWrite = Size + 2;
uint8 *WritePtr = Buffer;
while(BytesToWrite > 0){
- int ret = (int)write(Connection->GetSocket(), WritePtr, BytesToWrite);
- if(ret > 0){
- BytesToWrite -= ret;
- WritePtr += ret;
- }else if(ret == 0){
+ int BytesWritten = (int)write(Connection->GetSocket(), WritePtr, BytesToWrite);
+ if(BytesWritten > 0){
+ BytesToWrite -= BytesWritten;
+ WritePtr += BytesWritten;
+ }else if(BytesWritten == 0){
// TODO(fusion): Can this even happen without an error?
error("WriteToSocket: Fehler %d beim Senden an Socket %d.\n",
errno, Connection->GetSocket());