mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-02 02:15:58 -04:00
newer standards prefer nullptr over NULL - this is most of them but there are others too
This commit is contained in:
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
|
||||
SetupSharedFile::install(false);
|
||||
SetupSharedNetworkMessages::install();
|
||||
|
||||
SetupSharedRandom::install(static_cast<uint32>(time(NULL)));
|
||||
SetupSharedRandom::install(static_cast<uint32>(time(nullptr)));
|
||||
Os::setProgramName("CustomerServiceServer");
|
||||
ConfigCustomerServiceServer::install();
|
||||
NetworkHandler::install();
|
||||
|
||||
+4
-4
@@ -49,7 +49,7 @@ void CentralServerConnection::onConnectionOpened()
|
||||
|
||||
Service *chatServerService = CustomerServiceServer::getInstance().getChatServerService();
|
||||
|
||||
if (chatServerService != NULL)
|
||||
if (chatServerService != nullptr)
|
||||
{
|
||||
const std::string address(chatServerService->getBindAddress());
|
||||
const int port = chatServerService->getBindPort();
|
||||
@@ -62,7 +62,7 @@ void CentralServerConnection::onConnectionOpened()
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("CentralServerConnection", ("onConnectionOpened() ERROR: ChatServerService is NULL"));
|
||||
LOG("CentralServerConnection", ("onConnectionOpened() ERROR: ChatServerService is nullptr"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void CentralServerConnection::onConnectionOpened()
|
||||
|
||||
Service *gameServerService = CustomerServiceServer::getInstance().getGameServerService();
|
||||
|
||||
if (gameServerService != NULL)
|
||||
if (gameServerService != nullptr)
|
||||
{
|
||||
const std::string address(gameServerService->getBindAddress());
|
||||
const int port = gameServerService->getBindPort();
|
||||
@@ -84,7 +84,7 @@ void CentralServerConnection::onConnectionOpened()
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("CentralServerConnection", ("onConnectionOpened() ERROR: GameServerService is NULL"));
|
||||
LOG("CentralServerConnection", ("onConnectionOpened() ERROR: GameServerService is nullptr"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ void ChatServerConnection::sendTo(GameNetworkMessage const &message)
|
||||
{
|
||||
LOG("ChatServerConnection", ("sendTo() message(%s)", message.getCmdName().c_str()));
|
||||
|
||||
if (s_connection != NULL)
|
||||
if (s_connection != nullptr)
|
||||
{
|
||||
s_connection->send(message, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("ChatServerConnection", ("sendTo() Unable to send, NULL ChatServerConnection"));
|
||||
LOG("ChatServerConnection", ("sendTo() Unable to send, nullptr ChatServerConnection"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -12,19 +12,19 @@
|
||||
|
||||
namespace ConfigCustomerServiceServerNamespace
|
||||
{
|
||||
const char * s_clusterName = NULL;
|
||||
const char * s_centralServerAddress = NULL;
|
||||
const char * s_clusterName = nullptr;
|
||||
const char * s_centralServerAddress = nullptr;
|
||||
int s_centralServerPort = 0;
|
||||
const char * s_gameCode = NULL;
|
||||
const char * s_csServerAddress = NULL;
|
||||
const char * s_gameCode = nullptr;
|
||||
const char * s_csServerAddress = nullptr;
|
||||
int s_csServerPort = 0;
|
||||
int s_maxPacketsPerSecond = 50;
|
||||
int s_requestTimeoutSeconds = 300;
|
||||
int s_maxAllowedNumberOfTickets = 1;
|
||||
int s_gameServicePort = 0;
|
||||
int s_chatServicePort = 0;
|
||||
const char* s_chatServiceBindInterface = NULL;
|
||||
const char* s_gameServiceBindInterface = NULL;
|
||||
const char* s_chatServiceBindInterface = nullptr;
|
||||
const char* s_gameServiceBindInterface = nullptr;
|
||||
bool s_writeTicketToBugLog = false;
|
||||
};
|
||||
|
||||
|
||||
+52
-52
@@ -38,7 +38,7 @@ using namespace CSAssist;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CustomerServiceInterface::ClientInfo::ClientInfo()
|
||||
: m_connection(NULL)
|
||||
: m_connection(nullptr)
|
||||
, m_stationUserId(0)
|
||||
, m_ticketCount(-1)
|
||||
, m_pendingTicketCount(0)
|
||||
@@ -71,10 +71,10 @@ CustomerServiceInterface::~CustomerServiceInterface()
|
||||
delete m_japaneseCategoryList;
|
||||
|
||||
delete m_clientConnectionMap;
|
||||
m_clientConnectionMap = NULL;
|
||||
m_clientConnectionMap = nullptr;
|
||||
|
||||
delete m_suidToNetworkIdMap;
|
||||
m_suidToNetworkIdMap = NULL;
|
||||
m_suidToNetworkIdMap = nullptr;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -97,8 +97,8 @@ void CustomerServiceInterface::OnConnectCSAssist(
|
||||
}
|
||||
|
||||
m_connectionToBackEndEstablised = true;
|
||||
m_englishCategoryTrack = requestGetIssueHierarchy(NULL, Unicode::narrowToWide("Default").data(), Unicode::narrowToWide("en").data());;
|
||||
m_japaneseCategoryTrack = requestGetIssueHierarchy(NULL, Unicode::narrowToWide("Default").data(), Unicode::narrowToWide("ja").data());;
|
||||
m_englishCategoryTrack = requestGetIssueHierarchy(nullptr, Unicode::narrowToWide("Default").data(), Unicode::narrowToWide("en").data());;
|
||||
m_japaneseCategoryTrack = requestGetIssueHierarchy(nullptr, Unicode::narrowToWide("Default").data(), Unicode::narrowToWide("ja").data());;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ void CustomerServiceInterface::OnConnectRejectedCSAssist(const CSAssistGameAPITr
|
||||
|
||||
void CustomerServiceInterface::parseIssueChild(CategoryList & categoryList, xmlNodePtr childPtr)
|
||||
{
|
||||
static CustomerServiceCategory *currentCategory = NULL;
|
||||
static CustomerServiceCategory *currentCategory = nullptr;
|
||||
xmlNodePtr child = childPtr->children;
|
||||
|
||||
//start element
|
||||
@@ -142,19 +142,19 @@ void CustomerServiceInterface::parseIssueChild(CategoryList & categoryList, xmlN
|
||||
|
||||
val = reinterpret_cast<char *>(xmlGetProp(childPtr, (const unsigned char *)"isBugType"));
|
||||
|
||||
bool const isBugType = (val != NULL) && (strcmp(val, "true") == 0);
|
||||
bool const isBugType = (val != nullptr) && (strcmp(val, "true") == 0);
|
||||
|
||||
// Check for service type
|
||||
|
||||
val = reinterpret_cast<char *>(xmlGetProp(childPtr, (const unsigned char *)"isServiceType"));
|
||||
|
||||
bool const isServiceType = (val != NULL) && (strcmp(val, "true") == 0);
|
||||
bool const isServiceType = (val != nullptr) && (strcmp(val, "true") == 0);
|
||||
|
||||
// Check if valid
|
||||
|
||||
val = reinterpret_cast<char *>(xmlGetProp(childPtr, (const unsigned char *)"invalid"));
|
||||
|
||||
bool const invalid = (val != NULL) && (strcmp(val, "true") == 0);
|
||||
bool const invalid = (val != nullptr) && (strcmp(val, "true") == 0);
|
||||
|
||||
if (!invalid)
|
||||
{
|
||||
@@ -187,9 +187,9 @@ void CustomerServiceInterface::parseIssueChild(CategoryList & categoryList, xmlN
|
||||
}
|
||||
}
|
||||
|
||||
while (child != NULL)
|
||||
while (child != nullptr)
|
||||
{
|
||||
if (child->name != NULL)
|
||||
if (child->name != nullptr)
|
||||
{
|
||||
parseIssueChild(categoryList, child);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ void CustomerServiceInterface::parseIssueChild(CategoryList & categoryList, xmlN
|
||||
if (currentCategory)
|
||||
{
|
||||
delete currentCategory;
|
||||
currentCategory = NULL;
|
||||
currentCategory = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,13 +215,13 @@ void CustomerServiceInterface::parseIssueChild(CategoryList & categoryList, xmlN
|
||||
|
||||
void CustomerServiceInterface::parseIssueHierarchy(CategoryList & categoryList, Unicode::String const & xmlData)
|
||||
{
|
||||
xmlDocPtr xmlInfo = NULL;
|
||||
xmlDocPtr xmlInfo = nullptr;
|
||||
Unicode::UTF8String xmlDataUtf8(Unicode::wideToUTF8(xmlData));
|
||||
|
||||
if ((xmlInfo = xmlParseMemory(xmlDataUtf8.c_str(), xmlDataUtf8.length())) != NULL)
|
||||
if ((xmlInfo = xmlParseMemory(xmlDataUtf8.c_str(), xmlDataUtf8.length())) != nullptr)
|
||||
{
|
||||
xmlNodePtr xmlCurrent = xmlDocGetRootElement(xmlInfo);
|
||||
if (xmlCurrent != NULL)
|
||||
if (xmlCurrent != nullptr)
|
||||
{
|
||||
parseIssueChild(categoryList, xmlCurrent);
|
||||
}
|
||||
@@ -247,7 +247,7 @@ void CustomerServiceInterface::OnGetIssueHierarchy(
|
||||
return;
|
||||
}
|
||||
|
||||
if (hierarchyBody != NULL)
|
||||
if (hierarchyBody != nullptr)
|
||||
{
|
||||
if (track == m_englishCategoryTrack)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ void CustomerServiceInterface::OnGetIssueHierarchy(
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("CSServer", ("ERROR: NULL hierarchy returned from platform...why did this happen?", track, modifyData, result, getErrorString(result)));
|
||||
LOG("CSServer", ("ERROR: nullptr hierarchy returned from platform...why did this happen?", track, modifyData, result, getErrorString(result)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,9 +282,9 @@ void CustomerServiceInterface::OnCreateTicket(
|
||||
CreateTicketResponseMessage message(result, ticket);
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnCreateTicket() track(%i) result(%i) (%s) networkId(%s) ticketId(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", ticket));
|
||||
LOG("CSServer", ("OnCreateTicket() track(%i) result(%i) (%s) networkId(%s) ticketId(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", ticket));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
if (result == CSASSIST_RESULT_SUCCESS)
|
||||
{
|
||||
@@ -296,7 +296,7 @@ void CustomerServiceInterface::OnCreateTicket(
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,14 +312,14 @@ void CustomerServiceInterface::OnAppendTicketComment(
|
||||
AppendCommentResponseMessage message(result, ticket);
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnAppendTicketComment() track(%i) result(%i) (%s) networkId(%s) ticketId(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", ticket));
|
||||
LOG("CSServer", ("OnAppendTicketComment() track(%i) result(%i) (%s) networkId(%s) ticketId(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", ticket));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,9 +335,9 @@ void CustomerServiceInterface::OnCancelTicket(
|
||||
CancelTicketResponseMessage message(result, ticket);
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnCancelTicket() track(%i) result(%i) (%s) networkId(%s) ticketId(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", ticket));
|
||||
LOG("CSServer", ("OnCancelTicket() track(%i) result(%i) (%s) networkId(%s) ticketId(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", ticket));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
if (result == CSASSIST_RESULT_SUCCESS)
|
||||
{
|
||||
@@ -347,7 +347,7 @@ void CustomerServiceInterface::OnCancelTicket(
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,9 +378,9 @@ void CustomerServiceInterface::OnGetTicketByCharacter(
|
||||
GetTicketsResponseMessage message(result, totalNumber, tickets);
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnGetTicketByCharacter() track(%i) result(%i) (%s) networkId(%s) totalNumber(%i) numberReturned(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", totalNumber, numberReturned));
|
||||
LOG("CSServer", ("OnGetTicketByCharacter() track(%i) result(%i) (%s) networkId(%s) totalNumber(%i) numberReturned(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", totalNumber, numberReturned));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
// Save the number of tickets this player has
|
||||
|
||||
@@ -396,7 +396,7 @@ void CustomerServiceInterface::OnGetTicketByCharacter(
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,14 +423,14 @@ void CustomerServiceInterface::OnGetTicketComments(
|
||||
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnGetTicketComments() track(%i) result(%i) (%s) networkId(%s) numberRead(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", numberRead));
|
||||
LOG("CSServer", ("OnGetTicketComments() track(%i) result(%i) (%s) networkId(%s) numberRead(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", numberRead));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,14 +455,14 @@ void CustomerServiceInterface::OnSearchKB(
|
||||
SearchKnowledgeBaseResponseMessage message(result, searchResultsVector);
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnSearchKB() track(%i) result(%i) (%s) networkId(%s) numberRead(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", numberRead));
|
||||
LOG("CSServer", ("OnSearchKB() track(%i) result(%i) (%s) networkId(%s) numberRead(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", numberRead));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,12 +482,12 @@ void CustomerServiceInterface::OnGetKBArticle(
|
||||
{
|
||||
GetArticleResponseMessage message(result, Unicode::String(articleBody));
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ void CustomerServiceInterface::OnIssueHierarchyChanged(
|
||||
{
|
||||
LOG("CSServer", ("OnIssueHierarchyChanged()"));
|
||||
|
||||
requestGetIssueHierarchy(NULL, version, language);
|
||||
requestGetIssueHierarchy(nullptr, version, language);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -512,9 +512,9 @@ void CustomerServiceInterface::OnNewTicketActivity(const CSAssistGameAPITrack tr
|
||||
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnNewTicketActivity() track(%i) result(%i) (%s) networkId(%s) activity(%s) ticket count(%i)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA", NewActivityFlag ? "yes" : "no", HasTickets));
|
||||
LOG("CSServer", ("OnNewTicketActivity() track(%i) result(%i) (%s) networkId(%s) activity(%s) ticket count(%i)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA", NewActivityFlag ? "yes" : "no", HasTickets));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
// Save the number of tickets this player has
|
||||
|
||||
@@ -530,7 +530,7 @@ void CustomerServiceInterface::OnNewTicketActivity(const CSAssistGameAPITrack tr
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -540,12 +540,12 @@ void CustomerServiceInterface::OnMarkTicketRead(const CSAssistGameAPITrack track
|
||||
{
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnMarkTicketRead() track(%i) result(%i) (%s) networkId(%s)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA"));
|
||||
LOG("CSServer", ("OnMarkTicketRead() track(%i) result(%i) (%s) networkId(%s)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA"));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,16 +575,16 @@ void CustomerServiceInterface::OnRegisterCharacter(const CSAssistGameAPITrack tr
|
||||
{
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnRegisterCharacter() track(%i) result(%i) (%s) networkId(%s)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA"));
|
||||
LOG("CSServer", ("OnRegisterCharacter() track(%i) result(%i) (%s) networkId(%s)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA"));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
ConnectPlayerResponseMessage message(result);
|
||||
|
||||
sendToClient(*tmpNetworkId, message);
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,9 +594,9 @@ void CustomerServiceInterface::OnUnRegisterCharacter(const CSAssistGameAPITrack
|
||||
{
|
||||
const NetworkId *tmpNetworkId = reinterpret_cast<const NetworkId *>(userData);
|
||||
|
||||
LOG("CSServer", ("OnUnRegisterCharacter() track(%i) result(%i) (%s) networkId(%s)", track, result, getErrorString(result), (tmpNetworkId != NULL) ? tmpNetworkId->getValueString().c_str() : "NA"));
|
||||
LOG("CSServer", ("OnUnRegisterCharacter() track(%i) result(%i) (%s) networkId(%s)", track, result, getErrorString(result), (tmpNetworkId != nullptr) ? tmpNetworkId->getValueString().c_str() : "NA"));
|
||||
|
||||
if (tmpNetworkId != NULL)
|
||||
if (tmpNetworkId != nullptr)
|
||||
{
|
||||
// If the player was successfully unregistered, remove the local cached reference
|
||||
|
||||
@@ -606,7 +606,7 @@ void CustomerServiceInterface::OnUnRegisterCharacter(const CSAssistGameAPITrack
|
||||
}
|
||||
|
||||
delete tmpNetworkId;
|
||||
tmpNetworkId = NULL;
|
||||
tmpNetworkId = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,7 +708,7 @@ void CustomerServiceInterface::sendToClient(const NetworkId &player, const GameN
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG("CSServer", ("sendToClient() Connection is NULL: networkId(%s) cmdName(%s)", player.getValueString().c_str(), message.getCmdName().c_str()));
|
||||
LOG("CSServer", ("sendToClient() Connection is nullptr: networkId(%s) cmdName(%s)", player.getValueString().c_str(), message.getCmdName().c_str()));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -779,7 +779,7 @@ void CustomerServiceInterface::requestUnRegisterCharacter(const NetworkId &reque
|
||||
LOG("CSServer", ("requestUnRegisterCharacter() networkId(%s) suid(%i)", requester.getValueString().c_str(), suid));
|
||||
|
||||
NetworkId *tmpNetworkId = new NetworkId(requester);
|
||||
CSAssistGameAPI::requestUnRegisterCharacter(reinterpret_cast<const void *>(tmpNetworkId), suid, NULL);
|
||||
CSAssistGameAPI::requestUnRegisterCharacter(reinterpret_cast<const void *>(tmpNetworkId), suid, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+14
-14
@@ -49,7 +49,7 @@ namespace CustomerServiceServerNamespace
|
||||
|
||||
using namespace CustomerServiceServerNamespace;
|
||||
|
||||
CustomerServiceServer *CustomerServiceServer::m_instance = NULL;
|
||||
CustomerServiceServer *CustomerServiceServer::m_instance = nullptr;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -83,12 +83,12 @@ CustomerServiceServer::PendingTicket::PendingTicket()
|
||||
|
||||
CustomerServiceServer::CustomerServiceServer() :
|
||||
m_callback(new MessageDispatch::Callback),
|
||||
m_centralServerConnection(NULL),
|
||||
m_centralServerConnection(nullptr),
|
||||
m_connectionServerSet(new ConnectionServerSet),
|
||||
m_done(false),
|
||||
m_csInterface(ConfigCustomerServiceServer::getCustomerServiceServerAddress(), ConfigCustomerServiceServer::getCustomerServiceServerPort(), ConfigCustomerServiceServer::getRequestTimeoutSeconds()),
|
||||
m_gameServerService(NULL),
|
||||
m_chatServerService(NULL),
|
||||
m_gameServerService(nullptr),
|
||||
m_chatServerService(nullptr),
|
||||
m_nextSequenceId(0),
|
||||
m_pendingTicketList(new PendingTicketList)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ m_pendingTicketList(new PendingTicketList)
|
||||
|
||||
m_csInterface.setMaxPacketsPerSecond(ConfigCustomerServiceServer::getMaxPacketsPerSecond());
|
||||
|
||||
m_csInterface.connectCSAssist(NULL,
|
||||
m_csInterface.connectCSAssist(nullptr,
|
||||
Unicode::narrowToWide(ConfigCustomerServiceServer::getGameCode()).data(),
|
||||
Unicode::narrowToWide(ConfigCustomerServiceServer::getClusterName()).data());
|
||||
|
||||
@@ -148,19 +148,19 @@ CustomerServiceServer::~CustomerServiceServer()
|
||||
m_centralServerConnection->disconnect();
|
||||
|
||||
delete m_callback;
|
||||
m_callback = NULL;
|
||||
m_callback = nullptr;
|
||||
|
||||
delete m_connectionServerSet;
|
||||
m_connectionServerSet = NULL;
|
||||
m_connectionServerSet = nullptr;
|
||||
|
||||
delete m_gameServerService;
|
||||
m_gameServerService = NULL;
|
||||
m_gameServerService = nullptr;
|
||||
|
||||
delete m_chatServerService;
|
||||
m_chatServerService = NULL;
|
||||
m_chatServerService = nullptr;
|
||||
|
||||
delete m_pendingTicketList;
|
||||
m_pendingTicketList = NULL;
|
||||
m_pendingTicketList = nullptr;
|
||||
|
||||
MetricsManager::remove();
|
||||
delete s_customerServiceServerMetricsData;
|
||||
@@ -233,7 +233,7 @@ void CustomerServiceServer::update()
|
||||
|
||||
CustomerServiceServer &CustomerServiceServer::getInstance()
|
||||
{
|
||||
if (m_instance == NULL)
|
||||
if (m_instance == nullptr)
|
||||
{
|
||||
m_instance = new CustomerServiceServer;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ void CustomerServiceServer::getTickets(
|
||||
|
||||
NetworkId *tmpNetworkId = new NetworkId(requester);
|
||||
m_csInterface.requestGetTicketByCharacter(
|
||||
reinterpret_cast<const void *>(tmpNetworkId), suid, NULL,
|
||||
reinterpret_cast<const void *>(tmpNetworkId), suid, nullptr,
|
||||
start, count, markAsRead);
|
||||
}
|
||||
|
||||
@@ -475,7 +475,7 @@ void CustomerServiceServer::requestNewTicketActivity(const NetworkId &requester,
|
||||
|
||||
NetworkId *tmpNetworkId = new NetworkId(requester);
|
||||
|
||||
m_csInterface.requestNewTicketActivity(reinterpret_cast<const void *>(tmpNetworkId), suid, NULL);
|
||||
m_csInterface.requestNewTicketActivity(reinterpret_cast<const void *>(tmpNetworkId), suid, nullptr);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -497,7 +497,7 @@ void CustomerServiceServer::requestRegisterCharacter(const NetworkId &requester,
|
||||
LOG("CSServer", ("CustomerServiceInterface::requestRegisterCharacter() - networkId(%s) suid(%i)", requester.getValueString().c_str(), suid));
|
||||
|
||||
NetworkId *tmpNetworkId = new NetworkId(requester);
|
||||
m_csInterface.requestRegisterCharacter(reinterpret_cast<const void *>(tmpNetworkId), suid, NULL, 0);
|
||||
m_csInterface.requestRegisterCharacter(reinterpret_cast<const void *>(tmpNetworkId), suid, nullptr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user