aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/RemoteAccess
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-09-04 13:38:24 +0200
committerShauren <shauren.trinity@gmail.com>2020-09-04 13:38:24 +0200
commitb23190393248455f04d3a06def030a1ec7efad1e (patch)
tree1ce3772314492dcdb985641269a3114813d4b4dc /src/server/worldserver/RemoteAccess
parentb20acfe701e6f5f995f2776f076d3c494c02e1aa (diff)
Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port
Diffstat (limited to 'src/server/worldserver/RemoteAccess')
-rw-r--r--src/server/worldserver/RemoteAccess/RASession.cpp7
-rw-r--r--src/server/worldserver/RemoteAccess/RASession.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/server/worldserver/RemoteAccess/RASession.cpp b/src/server/worldserver/RemoteAccess/RASession.cpp
index c49863d353c..4a4a22b3c75 100644
--- a/src/server/worldserver/RemoteAccess/RASession.cpp
+++ b/src/server/worldserver/RemoteAccess/RASession.cpp
@@ -39,8 +39,7 @@ void RASession::Start()
if (_socket.available() > 0)
{
// Handle subnegotiation
- char buf[1024];
- memset(buf, 0, sizeof(buf));
+ char buf[1024] = { };
_socket.read_some(boost::asio::buffer(buf));
// Send the end-of-negotiation packet
@@ -91,7 +90,7 @@ void RASession::Start()
_socket.close();
}
-int RASession::Send(const char* data)
+int RASession::Send(char const* data)
{
std::ostream os(&_writeBuffer);
os << data;
@@ -204,7 +203,7 @@ bool RASession::ProcessCommand(std::string& command)
return false;
}
-void RASession::CommandPrint(void* callbackArg, const char* text)
+void RASession::CommandPrint(void* callbackArg, char const* text)
{
if (!text || !*text)
return;
diff --git a/src/server/worldserver/RemoteAccess/RASession.h b/src/server/worldserver/RemoteAccess/RASession.h
index 594f08160ac..e775bed5e33 100644
--- a/src/server/worldserver/RemoteAccess/RASession.h
+++ b/src/server/worldserver/RemoteAccess/RASession.h
@@ -42,13 +42,13 @@ public:
unsigned short GetRemotePort() const { return _socket.remote_endpoint().port(); }
private:
- int Send(const char* data);
+ int Send(char const* data);
std::string ReadString();
bool CheckAccessLevel(const std::string& user);
bool CheckPassword(const std::string& user, const std::string& pass);
bool ProcessCommand(std::string& command);
- static void CommandPrint(void* callbackArg, const char* text);
+ static void CommandPrint(void* callbackArg, char const* text);
static void CommandFinished(void* callbackArg, bool);
tcp::socket _socket;