From e86efb08bd606ea7b38749904e2347237dede6e3 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Fri, 8 Sep 2017 00:06:34 +0100 Subject: [PATCH] Fix build --- modules/lastseen.cpp | 2 +- modules/listsockets.cpp | 32 ++++++++++++++++---------------- modules/log.cpp | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/lastseen.cpp b/modules/lastseen.cpp index 35a57503..a1d6a106 100644 --- a/modules/lastseen.cpp +++ b/modules/lastseen.cpp @@ -33,7 +33,7 @@ class CLastSeenMod : public CModule { } const CString FormatLastSeen(const CUser* pUser, - const char* sDefault = "") { + const CString& sDefault = "") { time_t last = GetTime(pUser); if (last < 1) { return sDefault; diff --git a/modules/listsockets.cpp b/modules/listsockets.cpp index 7e2bddc2..55c67571 100644 --- a/modules/listsockets.cpp +++ b/modules/listsockets.cpp @@ -209,39 +209,39 @@ class CListSockets : public CModule { std::priority_queue socks = GetSockets(); CTable Table; - Table.AddColumn(t_s("Name"); - Table.AddColumn(t_s("Created"); - Table.AddColumn(t_s("State"); + Table.AddColumn(t_s("Name")); + Table.AddColumn(t_s("Created")); + Table.AddColumn(t_s("State")); #ifdef HAVE_LIBSSL - Table.AddColumn(t_s("SSL"); + Table.AddColumn(t_s("SSL")); #endif - Table.AddColumn(t_s("Local"); - Table.AddColumn(t_s("Remote"); - Table.AddColumn(t_s("In"); - Table.AddColumn(t_s("Out"); + Table.AddColumn(t_s("Local")); + Table.AddColumn(t_s("Remote")); + Table.AddColumn(t_s("In")); + Table.AddColumn(t_s("Out")); while (!socks.empty()) { Csock* pSocket = socks.top().GetSock(); socks.pop(); Table.AddRow(); - Table.SetCell(t_s("Name", pSocket->GetSockName()); - Table.SetCell(t_s("Created", GetCreatedTime(pSocket)); - Table.SetCell(t_s("State", GetSocketState(pSocket)); + Table.SetCell(t_s("Name"), pSocket->GetSockName()); + Table.SetCell(t_s("Created"), GetCreatedTime(pSocket)); + Table.SetCell(t_s("State"), GetSocketState(pSocket)); #ifdef HAVE_LIBSSL - Table.SetCell(t_s("SSL", pSocket->GetSSL() + Table.SetCell(t_s("SSL"), pSocket->GetSSL() ? t_s("Yes", "ssl") : t_s("No", "ssl")); #endif - Table.SetCell(t_s("Local", + Table.SetCell(t_s("Local"), GetLocalHost(pSocket, bShowHosts)); - Table.SetCell(t_s("Remote", + Table.SetCell(t_s("Remote"), GetRemoteHost(pSocket, bShowHosts)); - Table.SetCell(t_s("In", + Table.SetCell(t_s("In"), CString::ToByteStr(pSocket->GetBytesRead())); - Table.SetCell(t_s("Out", + Table.SetCell(t_s("Out"), CString::ToByteStr(pSocket->GetBytesWritten())); } diff --git a/modules/log.cpp b/modules/log.cpp index b9232c72..05685593 100644 --- a/modules/log.cpp +++ b/modules/log.cpp @@ -323,7 +323,7 @@ CString CLogMod::GetServer() { CServer* pServer = GetNetwork()->GetCurrentServer(); CString sSSL; - if (!pServer) return ("(no server)"; + if (!pServer) return "(no server)"; if (pServer->IsSSL()) sSSL = "+"; return pServer->GetName() + " " + sSSL + CString(pServer->GetPort());