From efef24fbbe11b1f007b815b42cac9af5017078f5 Mon Sep 17 00:00:00 2001 From: Jack Garrard Date: Thu, 27 Oct 2022 02:09:59 -0700 Subject: [PATCH] Fix variable names again --- include/server/SocketClient.hpp | 2 +- source/server/SocketClient.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/server/SocketClient.hpp b/include/server/SocketClient.hpp index a79b388..ff41816 100644 --- a/include/server/SocketClient.hpp +++ b/include/server/SocketClient.hpp @@ -70,7 +70,7 @@ class SocketClient : public SocketBase { sead::MessageQueue mSendQueue; char* recvBuf = nullptr; - int mMaxBufSize = 100; + int maxBufSize = 100; bool mIsFirstConnect = true; bool mPacketQueueOpen = true; diff --git a/source/server/SocketClient.cpp b/source/server/SocketClient.cpp index 6d5e5d3..2a207e7 100644 --- a/source/server/SocketClient.cpp +++ b/source/server/SocketClient.cpp @@ -81,7 +81,7 @@ nn::Result SocketClient::init(const char* ip, u16 port) { return result; } - if ((this->ket = nn::socket::Socket(2, 2, 17)) < 0) { + if ((this->mUdpSocket = nn::socket::Socket(2, 2, 17)) < 0) { Logger::log("Udp Socket failed to create"); this->socket_errno = nn::socket::GetLastErrno(); this->socket_log_state = SOCKET_LOG_UNAVAILABLE; @@ -125,7 +125,7 @@ u16 SocketClient::getLocalUdpPort() { u32 size = sizeof(udpAddress); nn::Result result; - if((result = nn::socket::GetSockName(this->ket, &udpAddress, &size)).isFailure()) { + if((result = nn::socket::GetSockName(this->mUdpSocket, &udpAddress, &size)).isFailure()) { this->socket_errno = nn::socket::GetLastErrno(); return 0; } @@ -176,7 +176,7 @@ bool SocketClient::send(Packet *packet) { fd = this->socket_log_socket; } else { - fd = this->ket; + fd = this->mUdpSocket; } @@ -207,7 +207,7 @@ bool SocketClient::recv() { pfds[0].fd = this->socket_log_socket; pfds[0].events = 1; pfds[0].revents = 0; - pfds[1].fd = this->ket; + pfds[1].fd = this->mUdpSocket; pfds[1].events = 1; pfds[1].revents = 0; @@ -341,7 +341,7 @@ bool SocketClient::recv() { } } } else { - Logger::log("Failed to acquire valid data! Packet Type: %d Full Packet Size %d valread size: %d", header->mType, fullSize, valread); + Logger::log("Failed to acquire valid data! Packet Type: %d Full Packet Size %d valread size: %d\n", header->mType, fullSize, valread); } return true;