summaryrefslogtreecommitdiff
path: root/Source/Core/Common/UPnP.cpp
diff options
context:
space:
mode:
authorMichael M <mchtly@gmail.com>2017-08-06 23:43:24 -0700
committerMichael M <mchtly@gmail.com>2017-08-13 18:50:52 -0700
commit862e0bec7961441103db917f8fe63cffdaa89afc (patch)
treeda458faa2c8483ca79ef251e4869c9033905ac7a /Source/Core/Common/UPnP.cpp
parent281f90efc33d59e2752b81b7d9c0398c8aecad26 (diff)
UPnP: cleanup function names
Diffstat (limited to 'Source/Core/Common/UPnP.cpp')
-rw-r--r--Source/Core/Common/UPnP.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/Common/UPnP.cpp b/Source/Core/Common/UPnP.cpp
index db8fc3ad6d..cb4a51574c 100644
--- a/Source/Core/Common/UPnP.cpp
+++ b/Source/Core/Common/UPnP.cpp
@@ -25,7 +25,7 @@ static std::thread s_thread;
// called from ---UPnP--- thread
// discovers the IGD
-static bool initUPnP()
+static bool InitUPnP()
{
static bool s_inited = false;
static bool s_error = false;
@@ -106,7 +106,7 @@ static bool initUPnP()
// hanging, the NVRAM will fill with portmappings, and eventually all UPnP
// requests will fail silently, with the only recourse being a factory reset.
// --
-static bool UPnPUnmapPort(const u16 port)
+static bool UnmapPort(const u16 port)
{
std::string port_str = StringFromFormat("%d", port);
UPNP_DeletePortMapping(s_urls.controlURL, s_data.first.servicetype, port_str.c_str(), "UDP",
@@ -117,10 +117,10 @@ static bool UPnPUnmapPort(const u16 port)
// called from ---UPnP--- thread
// Attempt to portforward!
-static bool UPnPMapPort(const char* addr, const u16 port)
+static bool MapPort(const char* addr, const u16 port)
{
if (s_mapped > 0)
- UPnPUnmapPort(s_mapped);
+ UnmapPort(s_mapped);
std::string port_str = StringFromFormat("%d", port);
int result = UPNP_AddPortMapping(
@@ -136,9 +136,9 @@ static bool UPnPMapPort(const char* addr, const u16 port)
}
// UPnP thread: try to map a port
-static void mapPortThread(const u16 port)
+static void MapPortThread(const u16 port)
{
- if (initUPnP() && UPnPMapPort(s_our_ip.data(), port))
+ if (InitUPnP() && MapPort(s_our_ip.data(), port))
{
NOTICE_LOG(NETPLAY, "Successfully mapped port %d to %s.", port, s_our_ip.data());
return;
@@ -148,24 +148,24 @@ static void mapPortThread(const u16 port)
}
// UPnP thread: try to unmap a port
-static void unmapPortThread()
+static void UnmapPortThread()
{
if (s_mapped > 0)
- UPnPUnmapPort(s_mapped);
+ UnmapPort(s_mapped);
}
void UPnP::TryPortmapping(u16 port)
{
if (s_thread.joinable())
s_thread.join();
- s_thread = std::thread(&mapPortThread, port);
+ s_thread = std::thread(&MapPortThread, port);
}
void UPnP::StopPortmapping()
{
if (s_thread.joinable())
s_thread.join();
- s_thread = std::thread(&unmapPortThread);
+ s_thread = std::thread(&UnmapPortThread);
s_thread.join();
}