Skip to content

Commit 2a6536c

Browse files
committed
mapport: rename 'use_pcp' to 'enable'
There is only a single protocol now, caller should just be concerned about whether to enable port mapping or not.
1 parent c4e82b8 commit 2a6536c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/interfaces/node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class Node
121121
virtual void resetSettings() = 0;
122122

123123
//! Map port.
124-
virtual void mapPort(bool use_pcp) = 0;
124+
virtual void mapPort(bool enable) = 0;
125125

126126
//! Get proxy.
127127
virtual bool getProxy(Network net, Proxy& proxy_info) = 0;

src/mapport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ static void MapPortProtoSetEnabled(bool enabled)
166166
g_mapport_enabled = enabled;
167167
}
168168

169-
void StartMapPort(bool use_pcp)
169+
void StartMapPort(bool enable)
170170
{
171-
MapPortProtoSetEnabled(use_pcp);
171+
MapPortProtoSetEnabled(enable);
172172
DispatchMapPort();
173173
}
174174

src/mapport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
static constexpr bool DEFAULT_NATPMP = false;
99

10-
void StartMapPort(bool use_pcp);
10+
void StartMapPort(bool enable);
1111
void InterruptMapPort();
1212
void StopMapPort();
1313

src/node/interfaces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class NodeImpl : public Node
187187
});
188188
args().WriteSettingsFile();
189189
}
190-
void mapPort(bool use_pcp) override { StartMapPort(use_pcp); }
190+
void mapPort(bool enable) override { StartMapPort(enable); }
191191
bool getProxy(Network net, Proxy& proxy_info) override { return GetProxy(net, proxy_info); }
192192
size_t getNodeCount(ConnectionDirection flags) override
193193
{

0 commit comments

Comments
 (0)