Skip to content

Commit 01906ce

Browse files
committed
pcp: make the ToString method const
1 parent ede388d commit 01906ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/common/pcp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ std::variant<MappingResult, MappingError> PCPRequestPortMap(const PCPMappingNonc
512512
return MappingResult(PCP_VERSION, CService(internal, port), CService(external_addr, external_port), lifetime_ret);
513513
}
514514

515-
std::string MappingResult::ToString()
515+
std::string MappingResult::ToString() const
516516
{
517517
Assume(version == NATPMP_VERSION || version == PCP_VERSION);
518518
return strprintf("%s:%s -> %s (for %ds)",

src/common/pcp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct MappingResult {
4040
uint32_t lifetime;
4141

4242
//! Format mapping as string for logging.
43-
std::string ToString();
43+
std::string ToString() const;
4444
};
4545

4646
//! Try to open a port using RFC 6886 NAT-PMP. IPv4 only.

0 commit comments

Comments
 (0)