Browse Source

Completely kill pnUtAddr and NetAddress.

Darryl Pogue 13 years ago
parent
commit
3ba721711e
  1. 2
      Sources/Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp
  2. 6
      Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h
  3. 6
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtInt.h
  4. 31
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp
  5. 6
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h
  6. 6
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp
  7. 9
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp
  8. 6
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/pnAceInt.h
  9. 6
      Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp
  10. 1
      Sources/Plasma/NucleusLib/pnUtils/CMakeLists.txt
  11. 57
      Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h
  12. 1
      Sources/Plasma/NucleusLib/pnUtils/pnUtAllIncludes.h
  13. 4
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp
  14. 8
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp
  15. 10
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp
  16. 4
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp
  17. 8
      Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp

2
Sources/Plasma/FeatureLib/pfCsrSrv/pfCsrSrv.cpp

@ -113,7 +113,7 @@ static bool QueryAccept (
void * , void * ,
unsigned channel, unsigned channel,
SimpleNetConn * , SimpleNetConn * ,
const NetAddress & addr const plNetAddress& addr
) { ) {
plString str = addr.AsString(); plString str = addr.AsString();
LogMsg(kLogPerf, L"pfCsrSrv: Accepted connection from %s", str.c_str()); LogMsg(kLogPerf, L"pfCsrSrv: Accepted connection from %s", str.c_str());

6
Sources/Plasma/NucleusLib/pnAsyncCore/Private/pnAcIo.h

@ -103,8 +103,8 @@ struct AsyncNotifySocket {
}; };
struct AsyncNotifySocketConnect : AsyncNotifySocket { struct AsyncNotifySocketConnect : AsyncNotifySocket {
NetAddress localAddr; plNetAddress localAddr;
NetAddress remoteAddr; plNetAddress remoteAddr;
unsigned connType; unsigned connType;
}; };
@ -113,7 +113,7 @@ struct AsyncNotifySocketListen : AsyncNotifySocketConnect {
unsigned buildType; unsigned buildType;
unsigned branchId; unsigned branchId;
Uuid productId; Uuid productId;
NetAddress addr; plNetAddress addr;
uint8_t * buffer; uint8_t * buffer;
unsigned bytes; unsigned bytes;
unsigned bytesProcessed; unsigned bytesProcessed;

6
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtInt.h

@ -191,7 +191,7 @@ void NtWaitForShutdown ();
void NtSleep (unsigned sleepMs); void NtSleep (unsigned sleepMs);
void NtSocketConnect ( void NtSocketConnect (
AsyncCancelId * cancelId, AsyncCancelId * cancelId,
const NetAddress & netAddr, const plNetAddress& netAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
void * param, void * param,
const void * sendData, const void * sendData,
@ -228,11 +228,11 @@ void NtSocketSetBacklogAlloc (
unsigned bufferSize unsigned bufferSize
); );
unsigned NtSocketStartListening ( unsigned NtSocketStartListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
); );
void NtSocketStopListening ( void NtSocketStopListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
); );
void NtSocketEnableNagling ( void NtSocketEnableNagling (

31
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Nt/pnAceNtSocket.cpp

@ -77,7 +77,7 @@ static const unsigned kMinBacklogBytes = 4 * 1024;
struct NtListener { struct NtListener {
LINK(NtListener) nextPort; LINK(NtListener) nextPort;
SOCKET hSocket; SOCKET hSocket;
NetAddress addr; plNetAddress addr;
FAsyncNotifySocketProc notifyProc; FAsyncNotifySocketProc notifyProc;
int listenCount; int listenCount;
@ -91,7 +91,7 @@ struct NtOpConnAttempt : Operation {
AsyncCancelId cancelId; AsyncCancelId cancelId;
bool canceled; bool canceled;
unsigned localPort; unsigned localPort;
NetAddress remoteAddr; plNetAddress remoteAddr;
FAsyncNotifySocketProc notifyProc; FAsyncNotifySocketProc notifyProc;
void * param; void * param;
SOCKET hSocket; SOCKET hSocket;
@ -113,7 +113,7 @@ struct NtOpSocketRead : Operation {
struct NtSock : NtObject { struct NtSock : NtObject {
LINK(NtSock) link; LINK(NtSock) link;
NetAddress addr; plNetAddress addr;
unsigned closeTimeMs; unsigned closeTimeMs;
unsigned connType; unsigned connType;
FAsyncNotifySocketProc notifyProc; FAsyncNotifySocketProc notifyProc;
@ -171,7 +171,7 @@ NtSock::~NtSock () {
//=========================================================================== //===========================================================================
// must be called inside s_listenCrit // must be called inside s_listenCrit
static bool ListenPortIncrement ( static bool ListenPortIncrement (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
int count int count
) { ) {
@ -192,12 +192,11 @@ static bool ListenPortIncrement (
//=========================================================================== //===========================================================================
static void SocketGetAddresses ( static void SocketGetAddresses (
NtSock * sock, NtSock * sock,
NetAddress * localAddr, plNetAddress* localAddr,
NetAddress * remoteAddr plNetAddress* remoteAddr
) { ) {
// NetAddress may be bigger than sockaddr_in so start by zeroing the whole thing localAddr->Clear();
memset(localAddr, 0, sizeof(*localAddr)); remoteAddr->Clear();
memset(remoteAddr, 0, sizeof(*remoteAddr));
// don't have to enter critsect or validate socket before referencing it // 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 // because this routine is called before the user has a chance to close it
@ -470,7 +469,7 @@ static bool SocketInitConnect (
//=========================================================================== //===========================================================================
static void SocketInitListen ( static void SocketInitListen (
NtSock * const sock, NtSock * const sock,
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
for (;;) { for (;;) {
@ -509,7 +508,7 @@ static void SocketInitListen (
} }
//=========================================================================== //===========================================================================
static SOCKET ListenSocket (NetAddress * listenAddr) { static SOCKET ListenSocket(plNetAddress* listenAddr) {
// create a new socket to listen // create a new socket to listen
SOCKET s; SOCKET s;
if (INVALID_SOCKET == (s = socket(AF_INET, SOCK_STREAM, 0))) { 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; SOCKET s;
if (INVALID_SOCKET == (s = socket(AF_INET, SOCK_STREAM, 0))) { if (INVALID_SOCKET == (s = socket(AF_INET, SOCK_STREAM, 0))) {
LogMsg(kLogError, "socket create failed"); LogMsg(kLogError, "socket create failed");
@ -1126,12 +1125,12 @@ bool INtSocketOpCompleteQueuedSocketWrite (
//=========================================================================== //===========================================================================
unsigned NtSocketStartListening ( unsigned NtSocketStartListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
s_listenCrit.Enter(); s_listenCrit.Enter();
StartListenThread(); StartListenThread();
NetAddress addr = listenAddr; plNetAddress addr = listenAddr;
for (;;) { for (;;) {
// if the port is already open then just increment the reference count // if the port is already open then just increment the reference count
if (ListenPortIncrement(addr, notifyProc, 1)) if (ListenPortIncrement(addr, notifyProc, 1))
@ -1160,7 +1159,7 @@ unsigned NtSocketStartListening (
//=========================================================================== //===========================================================================
void NtSocketStopListening ( void NtSocketStopListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
s_listenCrit.Enter(); s_listenCrit.Enter();
@ -1171,7 +1170,7 @@ void NtSocketStopListening (
//=========================================================================== //===========================================================================
void NtSocketConnect ( void NtSocketConnect (
AsyncCancelId * cancelId, AsyncCancelId * cancelId,
const NetAddress & netAddr, const plNetAddress& netAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
void * param, void * param,
const void * sendData, const void * sendData,

6
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xInt.h

@ -88,7 +88,7 @@ bool W9xThreadWaitId (
); );
void W9xSocketConnect ( void W9xSocketConnect (
AsyncCancelId * cancelId, AsyncCancelId * cancelId,
const NetAddress & netAddr, const plNetAddress& netAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
void * param, void * param,
const void * sendData, const void * sendData,
@ -126,11 +126,11 @@ void W9xSocketSetBacklogAlloc (
unsigned bufferSize unsigned bufferSize
); );
unsigned W9xSocketStartListening ( unsigned W9xSocketStartListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
); );
void W9xSocketStopListening ( void W9xSocketStopListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
); );
void W9xSocketEnableNagling ( void W9xSocketEnableNagling (

6
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/W9x/pnAceW9xSocket.cpp

@ -999,7 +999,7 @@ static LRESULT CALLBACK WndProc (
//=========================================================================== //===========================================================================
void W9xSocketConnect ( void W9xSocketConnect (
AsyncCancelId * cancelId, AsyncCancelId * cancelId,
const NetAddress & netAddr, const plNetAddress& netAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
void * param, void * param,
const void * sendData, const void * sendData,
@ -1148,7 +1148,7 @@ void W9xSocketDisconnect (
//=========================================================================== //===========================================================================
unsigned W9xSocketStartListening ( unsigned W9xSocketStartListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
return 0; return 0;
@ -1157,7 +1157,7 @@ unsigned W9xSocketStartListening (
//=========================================================================== //===========================================================================
void W9xSocketStopListening ( void W9xSocketStopListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
} }

9
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp

@ -89,7 +89,7 @@ static unsigned s_nextLookupCancelId = 1;
//=========================================================================== //===========================================================================
static void LookupProcess (Lookup * lookup, unsigned error) { static void LookupProcess (Lookup * lookup, unsigned error) {
unsigned count = 0; unsigned count = 0;
NetAddress * addrs = nil; plNetAddress* addrs = nil;
if (error) if (error)
return; return;
@ -109,8 +109,7 @@ static void LookupProcess (Lookup * lookup, unsigned error) {
++count; ++count;
// allocate a buffer large enough to hold all the addresses // allocate a buffer large enough to hold all the addresses
addrs = (NetAddress *)malloc(sizeof(*addrs) * count); addrs = new plNetAddress[count];
memset(addrs, 0, sizeof(*addrs) * count);
// fill in address data // fill in address data
const uint16_t port = htons((uint16_t) lookup->port); const uint16_t port = htons((uint16_t) lookup->port);
@ -134,7 +133,7 @@ static void LookupProcess (Lookup * lookup, unsigned error) {
delete lookup; delete lookup;
PerfSubCounter(kAsyncPerfNameLookupAttemptsCurr, 1); PerfSubCounter(kAsyncPerfNameLookupAttemptsCurr, 1);
free(addrs); delete[] addrs;
} }
//=========================================================================== //===========================================================================
@ -326,7 +325,7 @@ void AsyncAddressLookupName (
void AsyncAddressLookupAddr ( void AsyncAddressLookupAddr (
AsyncCancelId * cancelId, // out AsyncCancelId * cancelId, // out
FAsyncLookupProc lookupProc, FAsyncLookupProc lookupProc,
const NetAddress & address, const plNetAddress& address,
void * param void * param
) { ) {
ASSERT(lookupProc); ASSERT(lookupProc);

6
Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/pnAceInt.h

@ -106,7 +106,7 @@ typedef void (* FSleep) (unsigned sleepMs);
// Sockets // Sockets
typedef void (* FAsyncSocketConnect) ( typedef void (* FAsyncSocketConnect) (
AsyncCancelId * cancelId, AsyncCancelId * cancelId,
const NetAddress & netAddr, const plNetAddress& netAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
void * param, void * param,
const void * sendData, const void * sendData,
@ -151,12 +151,12 @@ typedef void (* FAsyncSocketSetBacklogAlloc) (
); );
typedef unsigned (* FAsyncSocketStartListening) ( typedef unsigned (* FAsyncSocketStartListening) (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
); );
typedef void (* FAsyncSocketStopListening) ( typedef void (* FAsyncSocketStopListening) (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
); );

6
Sources/Plasma/NucleusLib/pnAsyncCoreExe/pnAceIo.cpp

@ -206,7 +206,7 @@ static unsigned GetConnHash (
//=========================================================================== //===========================================================================
void AsyncSocketConnect ( void AsyncSocketConnect (
AsyncCancelId * cancelId, AsyncCancelId * cancelId,
const NetAddress & netAddr, const plNetAddress& netAddr,
FAsyncNotifySocketProc notifyProc, FAsyncNotifySocketProc notifyProc,
void * param, void * param,
const void * sendData, const void * sendData,
@ -293,7 +293,7 @@ void AsyncSocketSetBacklogAlloc (
//=========================================================================== //===========================================================================
unsigned AsyncSocketStartListening ( unsigned AsyncSocketStartListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
ASSERT(g_api.socketStartListening); ASSERT(g_api.socketStartListening);
@ -302,7 +302,7 @@ unsigned AsyncSocketStartListening (
//=========================================================================== //===========================================================================
void AsyncSocketStopListening ( void AsyncSocketStopListening (
const NetAddress & listenAddr, const plNetAddress& listenAddr,
FAsyncNotifySocketProc notifyProc FAsyncNotifySocketProc notifyProc
) { ) {
ASSERT(g_api.socketStopListening); ASSERT(g_api.socketStopListening);

1
Sources/Plasma/NucleusLib/pnUtils/CMakeLists.txt

@ -5,7 +5,6 @@ set(pnUtils_HEADERS
Pch.h Pch.h
pnUtils.h pnUtils.h
pnUtCoreLib.h pnUtCoreLib.h
pnUtAddr.h
pnUtAllIncludes.h pnUtAllIncludes.h
pnUtArray.h pnUtArray.h
pnUtCmd.h pnUtCmd.h

57
Sources/Plasma/NucleusLib/pnUtils/pnUtAddr.h

@ -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 <http://www.gnu.org/licenses/>.
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

1
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 "pnUtCoreLib.h" // must be first in list
#include "pnUtPragma.h" #include "pnUtPragma.h"
#include "pnUtAddr.h"
#include "pnUtUuid.h" #include "pnUtUuid.h"
#include "pnUtSort.h" #include "pnUtSort.h"
#include "pnUtArray.h" #include "pnUtArray.h"

4
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglAuth.cpp

@ -1528,7 +1528,7 @@ static void Connect (
//============================================================================ //============================================================================
static void Connect ( static void Connect (
const char name[], const char name[],
const NetAddress & addr const plNetAddress& addr
) { ) {
ASSERT(s_running); ASSERT(s_running);
@ -5146,7 +5146,7 @@ void NetCliAuthStartConnect (
} }
} }
if (!name[0]) { if (!name[0]) {
NetAddress addr(authAddrList[i], kNetDefaultClientPort); plNetAddress addr(authAddrList[i], kNetDefaultClientPort);
Connect(authAddrList[i], addr); Connect(authAddrList[i], addr);
} }
} }

8
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglCsr.cpp

@ -73,7 +73,7 @@ struct CliCsConn : AtomicRef {
AsyncSocket sock; AsyncSocket sock;
AsyncCancelId cancelId; AsyncCancelId cancelId;
NetCli * cli; NetCli * cli;
NetAddress addr; plNetAddress addr;
unsigned seq; unsigned seq;
bool abandoned; bool abandoned;
unsigned serverChallenge; unsigned serverChallenge;
@ -369,7 +369,7 @@ static bool SocketNotifyCallback (
//============================================================================ //============================================================================
static void Connect ( static void Connect (
const NetAddress & addr, const plNetAddress& addr,
ConnectParam * cp ConnectParam * cp
) { ) {
CliCsConn * conn = NEWZERO(CliCsConn); CliCsConn * conn = NEWZERO(CliCsConn);
@ -415,7 +415,7 @@ static void AsyncLookupCallback (
void * param, void * param,
const char name[], const char name[],
unsigned addrCount, unsigned addrCount,
const NetAddress addrs[] const plNetAddress addrs[]
) { ) {
if (!addrCount) { if (!addrCount) {
ReportNetError(kNetProtocolCli2Auth, kNetErrNameLookupFailed); ReportNetError(kNetProtocolCli2Auth, kNetErrNameLookupFailed);
@ -860,7 +860,7 @@ void NetCliCsrStartConnect (
} }
} }
if (!name[0]) { if (!name[0]) {
NetAddress addr(addrList[i], kNetDefaultClientPort); plNetAddress addr(addrList[i], kNetDefaultClientPort);
ConnectParam * cp = new ConnectParam; ConnectParam * cp = new ConnectParam;
cp->callback = callback; cp->callback = callback;

10
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 CLock sockLock; // to protect the socket pointer so we don't nuke it while using it
AsyncSocket sock; AsyncSocket sock;
char name[MAX_PATH]; char name[MAX_PATH];
NetAddress addr; plNetAddress addr;
unsigned seq; unsigned seq;
ARRAY(uint8_t) recvBuffer; ARRAY(uint8_t) recvBuffer;
AsyncCancelId cancelId; AsyncCancelId cancelId;
@ -540,7 +540,7 @@ static void Connect (CliFileConn * conn) {
//============================================================================ //============================================================================
static void Connect ( static void Connect (
const char name[], const char name[],
const NetAddress & addr const plNetAddress& addr
) { ) {
ASSERT(s_running); ASSERT(s_running);
@ -561,7 +561,7 @@ static void AsyncLookupCallback (
void * param, void * param,
const char name[], const char name[],
unsigned addrCount, unsigned addrCount,
const NetAddress addrs[] const plNetAddress addrs[]
) { ) {
if (!addrCount) { if (!addrCount) {
ReportNetError(kNetProtocolCli2File, kNetErrNameLookupFailed); ReportNetError(kNetProtocolCli2File, kNetErrNameLookupFailed);
@ -1362,7 +1362,7 @@ void NetCliFileStartConnect (
} }
} }
if (!name[0]) { if (!name[0]) {
NetAddress addr(fileAddrList[i], kNetDefaultClientPort); plNetAddress addr(fileAddrList[i], kNetDefaultClientPort);
Connect(fileAddrList[i], addr); Connect(fileAddrList[i], addr);
} }
} }
@ -1399,7 +1399,7 @@ void NetCliFileStartConnectAsServer (
} }
} }
if (!name[0]) { if (!name[0]) {
NetAddress addr(fileAddrList[i], kNetDefaultServerPort); plNetAddress addr(fileAddrList[i], kNetDefaultServerPort);
Connect(fileAddrList[i], addr); Connect(fileAddrList[i], addr);
} }
} }

4
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGame.cpp

@ -62,7 +62,7 @@ struct CliGmConn : AtomicRef {
AsyncSocket sock; AsyncSocket sock;
AsyncCancelId cancelId; AsyncCancelId cancelId;
NetCli * cli; NetCli * cli;
NetAddress addr; plNetAddress addr;
unsigned seq; unsigned seq;
bool abandoned; bool abandoned;
@ -354,7 +354,7 @@ static bool SocketNotifyCallback (
//============================================================================ //============================================================================
static void Connect ( static void Connect (
const NetAddress & addr const plNetAddress& addr
) { ) {
CliGmConn * conn = NEWZERO(CliGmConn); CliGmConn * conn = NEWZERO(CliGmConn);
conn->addr = addr; conn->addr = addr;

8
Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglGateKeeper.cpp

@ -90,7 +90,7 @@ struct CliGkConn : AtomicRef {
AsyncSocket sock; AsyncSocket sock;
NetCli * cli; NetCli * cli;
char name[MAX_PATH]; char name[MAX_PATH];
NetAddress addr; plNetAddress addr;
Uuid token; Uuid token;
unsigned seq; unsigned seq;
unsigned serverChallenge; unsigned serverChallenge;
@ -464,7 +464,7 @@ static void Connect (
//============================================================================ //============================================================================
static void Connect ( static void Connect (
const char name[], const char name[],
const NetAddress & addr const plNetAddress& addr
) { ) {
ASSERT(s_running); ASSERT(s_running);
@ -483,7 +483,7 @@ static void AsyncLookupCallback (
void * param, void * param,
const char name[], const char name[],
unsigned addrCount, unsigned addrCount,
const NetAddress addrs[] const plNetAddress addrs[]
) { ) {
if (!addrCount) { if (!addrCount) {
ReportNetError(kNetProtocolCli2GateKeeper, kNetErrNameLookupFailed); ReportNetError(kNetProtocolCli2GateKeeper, kNetErrNameLookupFailed);
@ -1076,7 +1076,7 @@ void NetCliGateKeeperStartConnect (
} }
} }
if (!name[0]) { if (!name[0]) {
NetAddress addr(gateKeeperAddrList[i], kNetDefaultClientPort); plNetAddress addr(gateKeeperAddrList[i], kNetDefaultClientPort);
Connect(gateKeeperAddrList[i], addr); Connect(gateKeeperAddrList[i], addr);
} }
} }

Loading…
Cancel
Save