diff options
| author | Anton <anton@picapica> | 2019-03-14 20:55:56 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2019-03-14 20:55:56 +0400 |
| commit | 12714d82ef6b88e85134909fb7a9eb076f8045d6 (patch) | |
| tree | d45e04268c03258c5fa56cd3851c5f9ae88b2ec8 /PICA_netconf.c | |
| parent | 343e2f9484701da43638cbf2379aeed7e62d7b74 (diff) | |
| download | pica-pica-12714d82ef6b88e85134909fb7a9eb076f8045d6.tar.gz pica-pica-12714d82ef6b88e85134909fb7a9eb076f8045d6.zip | |
compatibility fix for older libminiupnpc versions present on Ubuntu
Diffstat (limited to 'PICA_netconf.c')
| -rw-r--r-- | PICA_netconf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/PICA_netconf.c b/PICA_netconf.c index d1dbb30..d311798 100644 --- a/PICA_netconf.c +++ b/PICA_netconf.c @@ -135,7 +135,12 @@ int PICA_upnp_autoconfigure_ipv4(int public_port, int local_port, char *public_i char lpstr[8]; int ret; +#if MINIUPNPC_API_VERSION < 14 + devlist = upnpDiscover(2000, 0, 0, 0, 0, &error); +#else devlist = upnpDiscover(2000, 0, 0, 0, 0, 2, &error); +#endif + ret = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)); |
