From aaf198773fd8e041b0976cc0682e83f8acf394d0 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Tue, 1 Jul 2025 20:41:31 -0300 Subject: beginning of `query.cc` --- src/communication.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/communication.cc') 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()); -- cgit v1.2.3