]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
use proper string for conn->address when accepting a new client (otherwise it could...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jul 2003 16:31:39 +0000 (16:31 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jul 2003 16:31:39 +0000 (16:31 +0000)
thanks very much to Tomaz for tracking down this major bug

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3304 d7cf8633-e32d-0410-b094-e92efae38249

netconn.c

index ab269e9876944f003758e5418d5ccef21da03dd2..363fbb9e1d0314b6798aeeb6ae8ed12d37ec61b4 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1012,9 +1012,9 @@ int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length,
                                                                        if ((conn = NetConn_Open(mysocket, peeraddress)))
                                                                        {
                                                                                // allocated connection
-                                                                               strcpy(conn->address, addressstring2);
+                                                                               LHNETADDRESS_ToString(peeraddress, conn->address, sizeof(conn->address), true);
                                                                                if (developer.integer)
-                                                                                       Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", addressstring2);
+                                                                                       Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", conn->address);
                                                                                NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress);
                                                                                // now set up the client struct
                                                                                SV_ConnectClient(clientnum, conn);