Skip to content

Commit

Permalink
Update picoupnp.h
Browse files Browse the repository at this point in the history
  • Loading branch information
anzz1 committed Dec 6, 2023
1 parent 962cc96 commit 943203c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/picoupnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,6 @@ int UPNP_AddPortMapping(unsigned short port, int protocol)
if (protocol != IPPROTO_IP && protocol != IPPROTO_TCP && protocol != IPPROTO_UDP)
return 0;

if (WSAInit())
return 0;

if (!GetLocalIP(localip))
return 0;

Expand Down Expand Up @@ -478,6 +475,7 @@ int UPNP_AddPortMapping(unsigned short port, int protocol)

void AddPortMapping(unsigned short port, int protocol)
{
if (WSAInit()) return;
NATPMP_AddPortMapping(port, protocol);
UPNP_AddPortMapping(port, protocol);
}
Expand Down

0 comments on commit 943203c

Please sign in to comment.