From 7e442574c1c5ca3868f31b455bfe18b0a81139f9 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 13 Apr 2003 10:45:08 +0000 Subject: [PATCH] expanded UDP_Read and UDP_Write error messages to include the function parameters git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2943 d7cf8633-e32d-0410-b094-e92efae38249 --- net_udp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net_udp.c b/net_udp.c index 3a09a5f7..c417b0e1 100644 --- a/net_udp.c +++ b/net_udp.c @@ -258,11 +258,11 @@ int UDP_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr) int e = WSAGetLastError(); if (e == WSAEWOULDBLOCK || e == WSAECONNREFUSED) return 0; - Con_Printf("UDP_Read: WASGetLastError == %i\n", e); + Con_Printf("UDP_Read(%i, %p, %i, <%s>): WSAGetLastError == %i\n", socket, buf, len, UDP_AddrToString(addr), e); #else if (errno == EWOULDBLOCK || errno == ECONNREFUSED) return 0; - Con_Printf("UDP_Read: errno == %i (%s)\n", errno, strerror(errno)); + Con_Printf("UDP_Read(%i, %p, %i, <%s>): errno == %i (%s)\n", socket, buf, len, UDP_AddrToString(addr), errno, strerror(errno)); #endif } else if (developer_networking.integer) @@ -328,11 +328,11 @@ int UDP_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr) int e = WSAGetLastError(); if (e == WSAEWOULDBLOCK) return 0; - Con_Printf("UDP_Write: WASGetLastError == %i\n", e); + Con_Printf("UDP_Write(%i, %p, %i, <%s>): WSAGetLastError == %i\n", socket, buf, len, UDP_AddrToString(addr), e); #else if (errno == EWOULDBLOCK) return 0; - Con_Printf("UDP_Write: errno == %i (%s)\n", errno, strerror(errno)); + Con_Printf("UDP_Write(%i, %p, %i, <%s>): errno == %i (%s)\n", socket, buf, len, UDP_AddrToString(addr), errno, strerror(errno)); #endif } return ret; -- 2.39.2