MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / MapPort

Function MapPort

src/net.cpp:1184–1203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1182}
1183
1184void MapPort(bool fUseUPnP)
1185{
1186 static boost::thread* upnp_thread = NULL;
1187
1188 if (fUseUPnP)
1189 {
1190 if (upnp_thread) {
1191 upnp_thread->interrupt();
1192 upnp_thread->join();
1193 delete upnp_thread;
1194 }
1195 upnp_thread = new boost::thread(boost::bind(&TraceThread<void (*)()>, "upnp", &ThreadMapPort));
1196 }
1197 else if (upnp_thread) {
1198 upnp_thread->interrupt();
1199 upnp_thread->join();
1200 delete upnp_thread;
1201 upnp_thread = NULL;
1202 }
1203}
1204
1205#else
1206void MapPort(bool)

Callers 3

StartNodeFunction · 0.85
StopNodeFunction · 0.85
setDataMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected