diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2022-07-15 14:13:39 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-12-12 11:54:20 +0100 |
commit | 96c791dd20fea54c17d224000dee677bc158f66a (patch) | |
tree | 97fdcc0db13d7a7dd2b76040d2402e8c2e9b32a4 /src/httprpc.cpp | |
parent | 944a9de08a00f8273e73cd28b40e46cc0eb0bad1 (diff) |
net: remove CService::ToString() use ToStringAddrPort() instead
Both methods do the same thing, so simplify to having just one.
`ToString()` is too generic in this case and it is unclear what it does,
given that there are similar methods:
`ToStringAddr()` (inherited from `CNetAddr`),
`ToStringPort()` and
`ToStringAddrPort()`.
Diffstat (limited to 'src/httprpc.cpp')
-rw-r--r-- | src/httprpc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 4e7e72b037..107316ea50 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -160,7 +160,7 @@ static bool HTTPReq_JSONRPC(const std::any& context, HTTPRequest* req) JSONRPCRequest jreq; jreq.context = context; - jreq.peerAddr = req->GetPeer().ToString(); + jreq.peerAddr = req->GetPeer().ToStringAddrPort(); if (!RPCAuthorized(authHeader.second, jreq.authUser)) { LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", jreq.peerAddr); |