From 3ba721711e289f34ed87f4f22fe2d17a29e7cebb Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 26 Mar 2012 21:49:10 -0700 Subject: [PATCH] Completely kill pnUtAddr and NetAddress. --- .../Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp | 2 +- .../NucleusLib/pnAsyncCore/Private/pnAcIo.h | 6 +- .../pnAsyncCoreExe/Private/Nt/pnAceNtInt.h | 6 +- .../Private/Nt/pnAceNtSocket.cpp | 31 +++++----- .../pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h | 6 +- .../Private/W9x/pnAceW9xSocket.cpp | 6 +- .../Private/Win32/pnAceW32Dns.cpp | 9 ++- .../pnAsyncCoreExe/Private/pnAceInt.h | 6 +- .../NucleusLib/pnAsyncCoreExe/pnAceIo.cpp | 6 +- .../Plasma/NucleusLib/pnUtils/CMakeLists.txt | 1 - Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h | 57 ------------------- .../NucleusLib/pnUtils/pnUtAllIncludes.h | 1 - .../plNetGameLib/Private/plNglAuth.cpp | 4 +- .../plNetGameLib/Private/plNglCsr.cpp | 10 ++-- .../plNetGameLib/Private/plNglFile.cpp | 10 ++-- .../plNetGameLib/Private/plNglGame.cpp | 4 +- .../plNetGameLib/Private/plNglGateKeeper.cpp | 8 +-- 17 files changed, 56 insertions(+), 117 deletions(-) delete mode 100644 Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h diff --git a/Sources/Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp b/Sources/Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp index 01ead690..3c4c5a14 100644 --- a/Sources/Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp +++ b/Sources/Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp @@ -113,7 +113,7 @@ static bool QueryAccept ( void * , unsigned channel, SimpleNetConn * , - const NetAddress & addr + const plNetAddress& addr ) { plString str = addr.AsString(); LogMsg(kLogPerf, L"pfCsrSrv: Accepted connection from %s", str.c_str()); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h b/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h index ddad5c46..a09be9af 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h @@ -103,8 +103,8 @@ struct AsyncNotifySocket { }; struct AsyncNotifySocketConnect : AsyncNotifySocket { - NetAddress localAddr; - NetAddress remoteAddr; + plNetAddress localAddr; + plNetAddress remoteAddr; unsigned connType; }; @@ -113,7 +113,7 @@ struct AsyncNotifySocketListen : AsyncNotifySocketConnect { unsigned buildType; unsigned branchId; Uuid productId; - NetAddress addr; + plNetAddress addr; uint8_t * buffer; unsigned bytes; unsigned bytesProcessed; diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtInt.h b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtInt.h index 8f702287..60d5148e 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtInt.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtInt.h @@ -191,7 +191,7 @@ void NtWaitForShutdown (); void NtSleep (unsigned sleepMs); void NtSocketConnect ( AsyncCancelId * cancelId, - const NetAddress & netAddr, + const plNetAddress& netAddr, FAsyncNotifySocketProc notifyProc, void * param, const void * sendData, @@ -228,11 +228,11 @@ void NtSocketSetBacklogAlloc ( unsigned bufferSize ); unsigned NtSocketStartListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ); void NtSocketStopListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ); void NtSocketEnableNagling ( diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp index 04ae6d76..91490b37 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp @@ -77,7 +77,7 @@ static const unsigned kMinBacklogBytes = 4 * 1024; struct NtListener { LINK(NtListener) nextPort; SOCKET hSocket; - NetAddress addr; + plNetAddress addr; FAsyncNotifySocketProc notifyProc; int listenCount; @@ -91,7 +91,7 @@ struct NtOpConnAttempt : Operation { AsyncCancelId cancelId; bool canceled; unsigned localPort; - NetAddress remoteAddr; + plNetAddress remoteAddr; FAsyncNotifySocketProc notifyProc; void * param; SOCKET hSocket; @@ -113,7 +113,7 @@ struct NtOpSocketRead : Operation { struct NtSock : NtObject { LINK(NtSock) link; - NetAddress addr; + plNetAddress addr; unsigned closeTimeMs; unsigned connType; FAsyncNotifySocketProc notifyProc; @@ -171,7 +171,7 @@ NtSock::~NtSock () { //=========================================================================== // must be called inside s_listenCrit static bool ListenPortIncrement ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc, int count ) { @@ -192,12 +192,11 @@ static bool ListenPortIncrement ( //=========================================================================== static void SocketGetAddresses ( NtSock * sock, - NetAddress * localAddr, - NetAddress * remoteAddr + plNetAddress* localAddr, + plNetAddress* remoteAddr ) { - // NetAddress may be bigger than sockaddr_in so start by zeroing the whole thing - memset(localAddr, 0, sizeof(*localAddr)); - memset(remoteAddr, 0, sizeof(*remoteAddr)); + localAddr->Clear(); + remoteAddr->Clear(); // don't have to enter critsect or validate socket before referencing it // because this routine is called before the user has a chance to close it @@ -470,7 +469,7 @@ static bool SocketInitConnect ( //=========================================================================== static void SocketInitListen ( NtSock * const sock, - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { for (;;) { @@ -509,7 +508,7 @@ static void SocketInitListen ( } //=========================================================================== -static SOCKET ListenSocket (NetAddress * listenAddr) { +static SOCKET ListenSocket(plNetAddress* listenAddr) { // create a new socket to listen SOCKET s; if (INVALID_SOCKET == (s = socket(AF_INET, SOCK_STREAM, 0))) { @@ -612,7 +611,7 @@ static void ListenPrepareListeners (fd_set * readfds) { } //=========================================================================== -static SOCKET ConnectSocket (unsigned localPort, const NetAddress & addr) { +static SOCKET ConnectSocket (unsigned localPort, const plNetAddress& addr) { SOCKET s; if (INVALID_SOCKET == (s = socket(AF_INET, SOCK_STREAM, 0))) { LogMsg(kLogError, "socket create failed"); @@ -1126,12 +1125,12 @@ bool INtSocketOpCompleteQueuedSocketWrite ( //=========================================================================== unsigned NtSocketStartListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { s_listenCrit.Enter(); StartListenThread(); - NetAddress addr = listenAddr; + plNetAddress addr = listenAddr; for (;;) { // if the port is already open then just increment the reference count if (ListenPortIncrement(addr, notifyProc, 1)) @@ -1160,7 +1159,7 @@ unsigned NtSocketStartListening ( //=========================================================================== void NtSocketStopListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { s_listenCrit.Enter(); @@ -1171,7 +1170,7 @@ void NtSocketStopListening ( //=========================================================================== void NtSocketConnect ( AsyncCancelId * cancelId, - const NetAddress & netAddr, + const plNetAddress& netAddr, FAsyncNotifySocketProc notifyProc, void * param, const void * sendData, diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h index d518dbe1..5ca8974c 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h @@ -88,7 +88,7 @@ bool W9xThreadWaitId ( ); void W9xSocketConnect ( AsyncCancelId * cancelId, - const NetAddress & netAddr, + const plNetAddress& netAddr, FAsyncNotifySocketProc notifyProc, void * param, const void * sendData, @@ -126,11 +126,11 @@ void W9xSocketSetBacklogAlloc ( unsigned bufferSize ); unsigned W9xSocketStartListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ); void W9xSocketStopListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ); void W9xSocketEnableNagling ( diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp index e94bd60c..c7d63d53 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp @@ -999,7 +999,7 @@ static LRESULT CALLBACK WndProc ( //=========================================================================== void W9xSocketConnect ( AsyncCancelId * cancelId, - const NetAddress & netAddr, + const plNetAddress& netAddr, FAsyncNotifySocketProc notifyProc, void * param, const void * sendData, @@ -1148,7 +1148,7 @@ void W9xSocketDisconnect ( //=========================================================================== unsigned W9xSocketStartListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { return 0; @@ -1157,7 +1157,7 @@ unsigned W9xSocketStartListening ( //=========================================================================== void W9xSocketStopListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { } diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp index 9221e97d..3aa557b3 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp @@ -89,7 +89,7 @@ static unsigned s_nextLookupCancelId = 1; //=========================================================================== static void LookupProcess (Lookup * lookup, unsigned error) { unsigned count = 0; - NetAddress * addrs = nil; + plNetAddress* addrs = nil; if (error) return; @@ -109,8 +109,7 @@ static void LookupProcess (Lookup * lookup, unsigned error) { ++count; // allocate a buffer large enough to hold all the addresses - addrs = (NetAddress *)malloc(sizeof(*addrs) * count); - memset(addrs, 0, sizeof(*addrs) * count); + addrs = new plNetAddress[count]; // fill in address data const uint16_t port = htons((uint16_t) lookup->port); @@ -134,7 +133,7 @@ static void LookupProcess (Lookup * lookup, unsigned error) { delete lookup; PerfSubCounter(kAsyncPerfNameLookupAttemptsCurr, 1); - free(addrs); + delete[] addrs; } //=========================================================================== @@ -326,7 +325,7 @@ void AsyncAddressLookupName ( void AsyncAddressLookupAddr ( AsyncCancelId * cancelId, // out FAsyncLookupProc lookupProc, - const NetAddress & address, + const plNetAddress& address, void * param ) { ASSERT(lookupProc); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/pnAceInt.h b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/pnAceInt.h index 83270e82..9517e798 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/pnAceInt.h +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/pnAceInt.h @@ -106,7 +106,7 @@ typedef void (* FSleep) (unsigned sleepMs); // Sockets typedef void (* FAsyncSocketConnect) ( AsyncCancelId * cancelId, - const NetAddress & netAddr, + const plNetAddress& netAddr, FAsyncNotifySocketProc notifyProc, void * param, const void * sendData, @@ -151,12 +151,12 @@ typedef void (* FAsyncSocketSetBacklogAlloc) ( ); typedef unsigned (* FAsyncSocketStartListening) ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ); typedef void (* FAsyncSocketStopListening) ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ); diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp index bd4ef8d1..a4b6bc6d 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp @@ -206,7 +206,7 @@ static unsigned GetConnHash ( //=========================================================================== void AsyncSocketConnect ( AsyncCancelId * cancelId, - const NetAddress & netAddr, + const plNetAddress& netAddr, FAsyncNotifySocketProc notifyProc, void * param, const void * sendData, @@ -293,7 +293,7 @@ void AsyncSocketSetBacklogAlloc ( //=========================================================================== unsigned AsyncSocketStartListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { ASSERT(g_api.socketStartListening); @@ -302,7 +302,7 @@ unsigned AsyncSocketStartListening ( //=========================================================================== void AsyncSocketStopListening ( - const NetAddress & listenAddr, + const plNetAddress& listenAddr, FAsyncNotifySocketProc notifyProc ) { ASSERT(g_api.socketStopListening); diff --git a/Sources/Plasma/NucleusLib/pnUtils/CMakeLists.txt b/Sources/Plasma/NucleusLib/pnUtils/CMakeLists.txt index 035dbfcd..ce0441c4 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/CMakeLists.txt +++ b/Sources/Plasma/NucleusLib/pnUtils/CMakeLists.txt @@ -5,7 +5,6 @@ set(pnUtils_HEADERS Pch.h pnUtils.h pnUtCoreLib.h - pnUtAddr.h pnUtAllIncludes.h pnUtArray.h pnUtCmd.h diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h b/Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h deleted file mode 100644 index 555d459b..00000000 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h +++ /dev/null @@ -1,57 +0,0 @@ -/*==LICENSE==* - -CyanWorlds.com Engine - MMOG client, server and tools -Copyright (C) 2011 Cyan Worlds, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -Additional permissions under GNU GPL version 3 section 7 - -If you modify this Program, or any covered work, by linking or -combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK, -NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent -JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK -(or a modified version of those libraries), -containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA, -PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG -JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the -licensors of this Program grant you additional -permission to convey the resulting work. Corresponding Source for a -non-source form of such a combination shall include the source code for -the parts of OpenSSL and IJG JPEG Library used as well as that of the covered -work. - -You can contact Cyan Worlds, Inc. by email legal@cyan.com - or by snail mail at: - Cyan Worlds, Inc. - 14617 N Newport Hwy - Mead, WA 99021 - -*==LICENSE==*/ -/***************************************************************************** -* -* $/Plasma20/Sources/Plasma/NucleusLib/pnUtils/Private/pnUtAddr.h -* -***/ - -#ifndef PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTADDR_H -#define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILS_PRIVATE_PNUTADDR_H - -#include "Pch.h" - -#include "pnNetCommon/plNetAddress.h" - -typedef plNetAddress NetAddress; - -#endif diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h b/Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h index b21a5e9c..c252179c 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h +++ b/Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h @@ -51,7 +51,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnUtCoreLib.h" // must be first in list #include "pnUtPragma.h" -#include "pnUtAddr.h" #include "pnUtUuid.h" #include "pnUtSort.h" #include "pnUtArray.h" diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp index 7f22b79a..4b8c51e7 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp @@ -1528,7 +1528,7 @@ static void Connect ( //============================================================================ static void Connect ( const char name[], - const NetAddress & addr + const plNetAddress& addr ) { ASSERT(s_running); @@ -5146,7 +5146,7 @@ void NetCliAuthStartConnect ( } } if (!name[0]) { - NetAddress addr(authAddrList[i], kNetDefaultClientPort); + plNetAddress addr(authAddrList[i], kNetDefaultClientPort); Connect(authAddrList[i], addr); } } diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp index e7025948..e3ed719b 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp @@ -73,7 +73,7 @@ struct CliCsConn : AtomicRef { AsyncSocket sock; AsyncCancelId cancelId; NetCli * cli; - NetAddress addr; + plNetAddress addr; unsigned seq; bool abandoned; unsigned serverChallenge; @@ -369,7 +369,7 @@ static bool SocketNotifyCallback ( //============================================================================ static void Connect ( - const NetAddress & addr, + const plNetAddress& addr, ConnectParam * cp ) { CliCsConn * conn = NEWZERO(CliCsConn); @@ -415,7 +415,7 @@ static void AsyncLookupCallback ( void * param, const char name[], unsigned addrCount, - const NetAddress addrs[] + const plNetAddress addrs[] ) { if (!addrCount) { ReportNetError(kNetProtocolCli2Auth, kNetErrNameLookupFailed); @@ -860,8 +860,8 @@ void NetCliCsrStartConnect ( } } if (!name[0]) { - NetAddress addr(addrList[i], kNetDefaultClientPort); - + plNetAddress addr(addrList[i], kNetDefaultClientPort); + ConnectParam * cp = new ConnectParam; cp->callback = callback; cp->param = param; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp index bb272328..3243669b 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp @@ -65,7 +65,7 @@ struct CliFileConn : AtomicRef { CLock sockLock; // to protect the socket pointer so we don't nuke it while using it AsyncSocket sock; char name[MAX_PATH]; - NetAddress addr; + plNetAddress addr; unsigned seq; ARRAY(uint8_t) recvBuffer; AsyncCancelId cancelId; @@ -540,7 +540,7 @@ static void Connect (CliFileConn * conn) { //============================================================================ static void Connect ( const char name[], - const NetAddress & addr + const plNetAddress& addr ) { ASSERT(s_running); @@ -561,7 +561,7 @@ static void AsyncLookupCallback ( void * param, const char name[], unsigned addrCount, - const NetAddress addrs[] + const plNetAddress addrs[] ) { if (!addrCount) { ReportNetError(kNetProtocolCli2File, kNetErrNameLookupFailed); @@ -1362,7 +1362,7 @@ void NetCliFileStartConnect ( } } if (!name[0]) { - NetAddress addr(fileAddrList[i], kNetDefaultClientPort); + plNetAddress addr(fileAddrList[i], kNetDefaultClientPort); Connect(fileAddrList[i], addr); } } @@ -1399,7 +1399,7 @@ void NetCliFileStartConnectAsServer ( } } if (!name[0]) { - NetAddress addr(fileAddrList[i], kNetDefaultServerPort); + plNetAddress addr(fileAddrList[i], kNetDefaultServerPort); Connect(fileAddrList[i], addr); } } diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp index 9210ca24..a2d2ef7e 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp @@ -62,7 +62,7 @@ struct CliGmConn : AtomicRef { AsyncSocket sock; AsyncCancelId cancelId; NetCli * cli; - NetAddress addr; + plNetAddress addr; unsigned seq; bool abandoned; @@ -354,7 +354,7 @@ static bool SocketNotifyCallback ( //============================================================================ static void Connect ( - const NetAddress & addr + const plNetAddress& addr ) { CliGmConn * conn = NEWZERO(CliGmConn); conn->addr = addr; diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp index 03f99cba..5e7ca09d 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp @@ -90,7 +90,7 @@ struct CliGkConn : AtomicRef { AsyncSocket sock; NetCli * cli; char name[MAX_PATH]; - NetAddress addr; + plNetAddress addr; Uuid token; unsigned seq; unsigned serverChallenge; @@ -464,7 +464,7 @@ static void Connect ( //============================================================================ static void Connect ( const char name[], - const NetAddress & addr + const plNetAddress& addr ) { ASSERT(s_running); @@ -483,7 +483,7 @@ static void AsyncLookupCallback ( void * param, const char name[], unsigned addrCount, - const NetAddress addrs[] + const plNetAddress addrs[] ) { if (!addrCount) { ReportNetError(kNetProtocolCli2GateKeeper, kNetErrNameLookupFailed); @@ -1076,7 +1076,7 @@ void NetCliGateKeeperStartConnect ( } } if (!name[0]) { - NetAddress addr(gateKeeperAddrList[i], kNetDefaultClientPort); + plNetAddress addr(gateKeeperAddrList[i], kNetDefaultClientPort); Connect(gateKeeperAddrList[i], addr); } }