Skip to content

Commit

Permalink
upnp: fix API change issue
Browse files Browse the repository at this point in the history
adjust once update to miniupnpc-2.2.8

Closes: gsliepen#458
Signed-off-by: Yixun Lan <[email protected]>
  • Loading branch information
dlan17 committed Jul 8, 2024
1 parent d9e42fa commit 8331467
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/upnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ static void upnp_refresh(void) {
struct IGDdatas data;

char myaddr[64];

#if (MINIUPNPC_API_VERSION >= 18)
char wnaddr[64];
int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr), wnaddr, sizeof(wnaddr));
#else
int result = UPNP_GetValidIGD(devices, &urls, &data, myaddr, sizeof(myaddr));
#endif

if(result <= 0) {
logger(DEBUG_PROTOCOL, LOG_WARNING, "[upnp] No IGD found");
Expand Down

0 comments on commit 8331467

Please sign in to comment.