Skip to content

Commit

Permalink
Merge pull request #147 from stefantalpalaru/miniupnpc
Browse files Browse the repository at this point in the history
Support the miniupnpc-2.2.8 API change
  • Loading branch information
G10h4ck authored Jul 4, 2024
2 parents ace268f + f1b89c4 commit c54e026
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rs_upnp/upnphandler_miniupnp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class uPnPConfigData
struct UPNPUrls urls;
struct IGDdatas data;
char lanaddr[16]; /* my ip address on the LAN */
#if MINIUPNPC_API_VERSION >= 18
char wanaddr[16]; /* my ip address on the WAN */
#endif
};

#include <iostream>
Expand Down Expand Up @@ -139,7 +142,11 @@ bool upnphandler::initUPnPState()
putchar('\n');
if(UPNP_GetValidIGD(upcd->devlist, &(upcd->urls),
&(upcd->data), upcd->lanaddr,
sizeof(upcd->lanaddr)))
sizeof(upcd->lanaddr)
#if MINIUPNPC_API_VERSION >= 18
, upcd->wanaddr, sizeof(upcd->wanaddr)
#endif
))
{
printf("Found valid IGD : %s\n",
upcd->urls.controlURL);
Expand Down

0 comments on commit c54e026

Please sign in to comment.