miniupnpc 2.2.7__tar.gz → 2.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {miniupnpc-2.2.7/miniupnpc.egg-info → miniupnpc-2.2.8}/PKG-INFO +1 -1
- miniupnpc-2.2.8/VERSION +1 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/miniupnpc.h +2 -2
- {miniupnpc-2.2.7 → miniupnpc-2.2.8/miniupnpc.egg-info}/PKG-INFO +1 -1
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minisoap.c +3 -4
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minissdpc.c +5 -4
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/miniupnpc.c +8 -35
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/miniupnpcmodule.c +3 -3
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/miniwget.c +4 -40
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/upnpc.c +15 -8
- miniupnpc-2.2.7/VERSION +0 -1
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/LICENSE +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/MANIFEST.in +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/Makefile +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/README +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/external-ip.sh +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/igd_desc_parse.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/miniupnpc_declspec.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/miniupnpctypes.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/miniwget.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/portlistingparse.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/upnpcommands.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/upnpdev.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/upnperrors.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/include/upnpreplyparse.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/miniupnpc.egg-info/SOURCES.txt +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/miniupnpc.egg-info/dependency_links.txt +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/miniupnpc.egg-info/top_level.txt +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/miniupnpcstrings.h.in +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/setup.cfg +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/setup.py +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/setupmingw32.py +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/addr_is_reserved.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/addr_is_reserved.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/codelength.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/connecthostport.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/connecthostport.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/igd_desc_parse.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/listdevices.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minihttptestserver.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minisoap.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minissdpc.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/miniupnpc_socketdef.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/miniwget_private.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minixml.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minixml.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/minixmlvalid.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/portlistingparse.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/receivedata.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/receivedata.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/testaddr_is_reserved.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/testigddescparse.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/testminiwget.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/testminixml.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/testportlistingparse.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/testupnpreplyparse.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/upnpcommands.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/upnpdev.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/upnperrors.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/upnpreplyparse.c +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/src/win32_snprintf.h +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/testminiwget.sh +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/testupnpreplyparse.sh +0 -0
- {miniupnpc-2.2.7 → miniupnpc-2.2.8}/updateminiupnpcstrings.sh +0 -0
miniupnpc-2.2.8/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.2.8
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* $Id: miniupnpc.h,v 1.
|
|
1
|
+
/* $Id: miniupnpc.h,v 1.66 2024/06/08 22:13:14 nanard Exp $ */
|
|
2
2
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
3
3
|
* Project: miniupnp
|
|
4
4
|
* http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
#define UPNPDISCOVER_MEMORY_ERROR (-102)
|
|
21
21
|
|
|
22
22
|
/* versions : */
|
|
23
|
-
#define MINIUPNPC_VERSION "2.2.
|
|
23
|
+
#define MINIUPNPC_VERSION "2.2.8"
|
|
24
24
|
#define MINIUPNPC_API_VERSION 18
|
|
25
25
|
|
|
26
26
|
/* Source port:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
3
3
|
* Project : miniupnp
|
|
4
4
|
* Author : Thomas Bernard
|
|
5
|
-
* Copyright (c) 2005-
|
|
5
|
+
* Copyright (c) 2005-2024 Thomas Bernard
|
|
6
6
|
* This software is subject to the conditions detailed in the
|
|
7
7
|
* LICENCE file provided in this distribution.
|
|
8
8
|
*
|
|
@@ -83,7 +83,7 @@ int soapPostSubmit(SOCKET fd,
|
|
|
83
83
|
* Using HTTP/1.1 means we need to support chunked transfer-encoding :
|
|
84
84
|
* When using HTTP/1.1, the router "BiPAC 7404VNOX" always use chunked
|
|
85
85
|
* transfer encoding. */
|
|
86
|
-
/* Connection:
|
|
86
|
+
/* Connection: close is normally there only in HTTP/1.1 but who knows */
|
|
87
87
|
portstr[0] = '\0';
|
|
88
88
|
if(port != 80)
|
|
89
89
|
snprintf(portstr, sizeof(portstr), ":%hu", port);
|
|
@@ -98,9 +98,8 @@ int soapPostSubmit(SOCKET fd,
|
|
|
98
98
|
"Content-Type: text/xml; charset=\"utf-8\"\r\n"
|
|
99
99
|
#endif
|
|
100
100
|
"SOAPAction: \"%s\"\r\n"
|
|
101
|
-
"Connection:
|
|
101
|
+
"Connection: close\r\n"
|
|
102
102
|
"Cache-Control: no-cache\r\n" /* ??? */
|
|
103
|
-
"Pragma: no-cache\r\n"
|
|
104
103
|
"\r\n",
|
|
105
104
|
url, httpversion, host, portstr, bodysize, action);
|
|
106
105
|
if ((unsigned int)headerssize >= sizeof(headerbuf))
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* $Id: minissdpc.c,v 1.
|
|
1
|
+
/* $Id: minissdpc.c,v 1.51 2024/05/16 00:12:05 nanard Exp $ */
|
|
2
2
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
3
3
|
* Project : miniupnp
|
|
4
4
|
* Web : http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
5
5
|
* Author : Thomas BERNARD
|
|
6
|
-
* copyright (c) 2005-
|
|
6
|
+
* copyright (c) 2005-2024 Thomas Bernard
|
|
7
7
|
* This software is subjet to the conditions detailed in the
|
|
8
8
|
* provided LICENCE file. */
|
|
9
9
|
#include <stdio.h>
|
|
@@ -548,7 +548,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
|
|
548
548
|
#ifdef _WIN32
|
|
549
549
|
unsigned long _ttl = (unsigned long)ttl;
|
|
550
550
|
#endif
|
|
551
|
-
int linklocal =
|
|
551
|
+
int linklocal = 0; /* try first with site-local multicast */
|
|
552
552
|
int sentok;
|
|
553
553
|
|
|
554
554
|
if(error)
|
|
@@ -1007,9 +1007,10 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
|
|
1007
1007
|
/* switch linklocal flag */
|
|
1008
1008
|
if(linklocal) {
|
|
1009
1009
|
linklocal = 0;
|
|
1010
|
-
--deviceIndex;
|
|
1011
1010
|
} else {
|
|
1011
|
+
/* try again with linklocal multicast */
|
|
1012
1012
|
linklocal = 1;
|
|
1013
|
+
--deviceIndex;
|
|
1013
1014
|
}
|
|
1014
1015
|
}
|
|
1015
1016
|
}
|
|
@@ -92,15 +92,15 @@ MINIUPNP_LIBSPEC void parserootdesc(const char * buffer, int bufsize, struct IGD
|
|
|
92
92
|
#endif
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
/*
|
|
95
|
+
/* simpleUPnPcommand :
|
|
96
96
|
* not so simple !
|
|
97
97
|
* return values :
|
|
98
98
|
* pointer - OK
|
|
99
99
|
* NULL - error */
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
char *
|
|
101
|
+
simpleUPnPcommand(int s, const char * url, const char * service,
|
|
102
|
+
const char * action, struct UPNParg * args,
|
|
103
|
+
int * bufsize)
|
|
104
104
|
{
|
|
105
105
|
char hostname[MAXHOSTNAMELEN+1];
|
|
106
106
|
unsigned short port = 0;
|
|
@@ -197,15 +197,15 @@ simpleUPnPcommand2(SOCKET s, const char * url, const char * service,
|
|
|
197
197
|
return NULL;
|
|
198
198
|
}
|
|
199
199
|
if(!parseURL(url, hostname, &port, &path, NULL)) return NULL;
|
|
200
|
-
if(ISINVALID(s)) {
|
|
200
|
+
if(ISINVALID((SOCKET)s)) {
|
|
201
201
|
s = connecthostport(hostname, port, 0);
|
|
202
|
-
if(ISINVALID(s)) {
|
|
202
|
+
if(ISINVALID((SOCKET)s)) {
|
|
203
203
|
/* failed to connect */
|
|
204
204
|
return NULL;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
n = soapPostSubmit(s, path, hostname, port, soapact, soapbody,
|
|
208
|
+
n = soapPostSubmit(s, path, hostname, port, soapact, soapbody, "1.1");
|
|
209
209
|
if(n<=0) {
|
|
210
210
|
#ifdef DEBUG
|
|
211
211
|
printf("Error sending SOAP request\n");
|
|
@@ -229,33 +229,6 @@ simpleUPnPcommand2(SOCKET s, const char * url, const char * service,
|
|
|
229
229
|
return buf;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
/* simpleUPnPcommand :
|
|
233
|
-
* not so simple !
|
|
234
|
-
* return values :
|
|
235
|
-
* pointer - OK
|
|
236
|
-
* NULL - error */
|
|
237
|
-
char *
|
|
238
|
-
simpleUPnPcommand(int s, const char * url, const char * service,
|
|
239
|
-
const char * action, struct UPNParg * args,
|
|
240
|
-
int * bufsize)
|
|
241
|
-
{
|
|
242
|
-
char * buf;
|
|
243
|
-
|
|
244
|
-
#if 1
|
|
245
|
-
buf = simpleUPnPcommand2((SOCKET)s, url, service, action, args, bufsize, "1.1");
|
|
246
|
-
#else
|
|
247
|
-
buf = simpleUPnPcommand2((SOCKET)s, url, service, action, args, bufsize, "1.0");
|
|
248
|
-
if (!buf || *bufsize == 0)
|
|
249
|
-
{
|
|
250
|
-
#if DEBUG
|
|
251
|
-
printf("Error or no result from SOAP request; retrying with HTTP/1.1\n");
|
|
252
|
-
#endif
|
|
253
|
-
buf = simpleUPnPcommand2((SOCKET)s, url, service, action, args, bufsize, "1.1");
|
|
254
|
-
}
|
|
255
|
-
#endif
|
|
256
|
-
return buf;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
232
|
/* upnpDiscoverDevices() :
|
|
260
233
|
* return a chained list of all devices found or NULL if
|
|
261
234
|
* no devices was found.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* $Id: miniupnpcmodule.c,v 1.
|
|
1
|
+
/* $Id: miniupnpcmodule.c,v 1.40 2024/05/09 15:10:29 nanard Exp $*/
|
|
2
2
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
3
3
|
* Project : miniupnp
|
|
4
4
|
* Author : Thomas BERNARD
|
|
5
5
|
* website : https://miniupnp.tuxfamily.org/
|
|
6
|
-
* copyright (c) 2007-
|
|
6
|
+
* copyright (c) 2007-2024 Thomas Bernard
|
|
7
7
|
* This software is subjet to the conditions detailed in the
|
|
8
8
|
* provided LICENCE file. */
|
|
9
9
|
#include <Python.h>
|
|
@@ -58,7 +58,7 @@ static PyMemberDef UPnP_members[] = {
|
|
|
58
58
|
{"lanaddr", T_STRING_INPLACE, offsetof(UPnPObject, lanaddr),
|
|
59
59
|
READONLY, "ip address on the LAN"
|
|
60
60
|
},
|
|
61
|
-
{"wanaddr", T_STRING_INPLACE, offsetof(UPnPObject,
|
|
61
|
+
{"wanaddr", T_STRING_INPLACE, offsetof(UPnPObject, wanaddr),
|
|
62
62
|
READONLY, "public ip address on the WAN"
|
|
63
63
|
},
|
|
64
64
|
{"discoverdelay", T_UINT, offsetof(UPnPObject, discoverdelay),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* Project : miniupnp
|
|
3
3
|
* Website : http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
|
|
4
4
|
* Author : Thomas Bernard
|
|
5
|
-
* Copyright (c) 2005-
|
|
5
|
+
* Copyright (c) 2005-2024 Thomas Bernard
|
|
6
6
|
* This software is subject to the conditions detailed in the
|
|
7
7
|
* LICENCE file provided in this distribution. */
|
|
8
8
|
|
|
@@ -443,9 +443,8 @@ miniwget3(const char * host,
|
|
|
443
443
|
len = snprintf(buf, sizeof(buf),
|
|
444
444
|
"GET %s HTTP/%s\r\n"
|
|
445
445
|
"Host: %s:%d\r\n"
|
|
446
|
-
"Connection:
|
|
446
|
+
"Connection: close\r\n"
|
|
447
447
|
"User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
|
|
448
|
-
|
|
449
448
|
"\r\n",
|
|
450
449
|
path, httpversion, host, port);
|
|
451
450
|
if ((unsigned int)len >= sizeof(buf))
|
|
@@ -474,41 +473,6 @@ miniwget3(const char * host,
|
|
|
474
473
|
return content;
|
|
475
474
|
}
|
|
476
475
|
|
|
477
|
-
/* miniwget2() :
|
|
478
|
-
* Call miniwget3(); retry with HTTP/1.1 if 1.0 fails. */
|
|
479
|
-
static void *
|
|
480
|
-
miniwget2(const char * host,
|
|
481
|
-
unsigned short port, const char * path,
|
|
482
|
-
int * size, char * addr_str, int addr_str_len,
|
|
483
|
-
unsigned int scope_id, int * status_code)
|
|
484
|
-
{
|
|
485
|
-
char * respbuffer;
|
|
486
|
-
|
|
487
|
-
#if 1
|
|
488
|
-
respbuffer = miniwget3(host, port, path, size,
|
|
489
|
-
addr_str, addr_str_len, "1.1",
|
|
490
|
-
scope_id, status_code);
|
|
491
|
-
#else
|
|
492
|
-
respbuffer = miniwget3(host, port, path, size,
|
|
493
|
-
addr_str, addr_str_len, "1.0",
|
|
494
|
-
scope_id, status_code);
|
|
495
|
-
if (*size == 0)
|
|
496
|
-
{
|
|
497
|
-
#ifdef DEBUG
|
|
498
|
-
printf("Retrying with HTTP/1.1\n");
|
|
499
|
-
#endif
|
|
500
|
-
free(respbuffer);
|
|
501
|
-
respbuffer = miniwget3(host, port, path, size,
|
|
502
|
-
addr_str, addr_str_len, "1.1",
|
|
503
|
-
scope_id, status_code);
|
|
504
|
-
}
|
|
505
|
-
#endif
|
|
506
|
-
return respbuffer;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
476
|
/* parseURL()
|
|
513
477
|
* arguments :
|
|
514
478
|
* url : source string not modified
|
|
@@ -639,7 +603,7 @@ miniwget(const char * url, int * size,
|
|
|
639
603
|
printf("parsed url : hostname='%s' port=%hu path='%s' scope_id=%u\n",
|
|
640
604
|
hostname, port, path, scope_id);
|
|
641
605
|
#endif
|
|
642
|
-
return
|
|
606
|
+
return miniwget3(hostname, port, path, size, 0, 0, "1.1", scope_id, status_code);
|
|
643
607
|
}
|
|
644
608
|
|
|
645
609
|
void *
|
|
@@ -660,5 +624,5 @@ miniwget_getaddr(const char * url, int * size,
|
|
|
660
624
|
printf("parsed url : hostname='%s' port=%hu path='%s' scope_id=%u\n",
|
|
661
625
|
hostname, port, path, scope_id);
|
|
662
626
|
#endif
|
|
663
|
-
return
|
|
627
|
+
return miniwget3(hostname, port, path, size, addr, addrlen, "1.1", scope_id, status_code);
|
|
664
628
|
}
|
|
@@ -403,7 +403,7 @@ static void GetFirewallStatus(struct UPNPUrls * urls, struct IGDdatas * data)
|
|
|
403
403
|
/* Test function
|
|
404
404
|
* 1 - Add pinhole
|
|
405
405
|
* 2 - Check if pinhole is working from the IGD side */
|
|
406
|
-
static
|
|
406
|
+
static int SetPinholeAndTest(struct UPNPUrls * urls, struct IGDdatas * data,
|
|
407
407
|
const char * remoteaddr, const char * eport,
|
|
408
408
|
const char * intaddr, const char * iport,
|
|
409
409
|
const char * proto, const char * lease_time)
|
|
@@ -416,7 +416,7 @@ static void SetPinholeAndTest(struct UPNPUrls * urls, struct IGDdatas * data,
|
|
|
416
416
|
if(!intaddr || !remoteaddr || !iport || !eport || !proto || !lease_time)
|
|
417
417
|
{
|
|
418
418
|
fprintf(stderr, "Wrong arguments\n");
|
|
419
|
-
return;
|
|
419
|
+
return -1;
|
|
420
420
|
}
|
|
421
421
|
if(atoi(proto) == 0)
|
|
422
422
|
{
|
|
@@ -435,13 +435,16 @@ static void SetPinholeAndTest(struct UPNPUrls * urls, struct IGDdatas * data,
|
|
|
435
435
|
else
|
|
436
436
|
{
|
|
437
437
|
fprintf(stderr, "invalid protocol\n");
|
|
438
|
-
return;
|
|
438
|
+
return -1;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
r = UPNP_AddPinhole(urls->controlURL_6FC, data->IPv6FC.servicetype, remoteaddr, eport, intaddr, iport, proto, lease_time, uniqueID);
|
|
442
442
|
if(r!=UPNPCOMMAND_SUCCESS)
|
|
443
|
+
{
|
|
443
444
|
printf("AddPinhole([%s]:%s -> [%s]:%s) failed with code %d (%s)\n",
|
|
444
445
|
remoteaddr, eport, intaddr, iport, r, strupnperror(r));
|
|
446
|
+
return -2;
|
|
447
|
+
}
|
|
445
448
|
else
|
|
446
449
|
{
|
|
447
450
|
printf("AddPinhole: ([%s]:%s -> [%s]:%s) / Pinhole ID = %s\n",
|
|
@@ -451,6 +454,7 @@ static void SetPinholeAndTest(struct UPNPUrls * urls, struct IGDdatas * data,
|
|
|
451
454
|
printf("CheckPinholeWorking() failed with code %d (%s)\n", r, strupnperror(r));
|
|
452
455
|
printf("CheckPinholeWorking: Pinhole ID = %s / IsWorking = %s\n", uniqueID, (isWorking)? "Yes":"No");*/
|
|
453
456
|
}
|
|
457
|
+
return 0;
|
|
454
458
|
}
|
|
455
459
|
|
|
456
460
|
/* Test function
|
|
@@ -548,7 +552,7 @@ CheckPinhole(struct UPNPUrls * urls,
|
|
|
548
552
|
printf("CheckPinholeWorking: Pinhole ID = %s / IsWorking = %s\n", uniqueID, (isWorking)? "Yes":"No");
|
|
549
553
|
}
|
|
550
554
|
|
|
551
|
-
static
|
|
555
|
+
static int
|
|
552
556
|
RemovePinhole(struct UPNPUrls * urls,
|
|
553
557
|
struct IGDdatas * data, const char * uniqueID)
|
|
554
558
|
{
|
|
@@ -556,10 +560,11 @@ RemovePinhole(struct UPNPUrls * urls,
|
|
|
556
560
|
if(!uniqueID)
|
|
557
561
|
{
|
|
558
562
|
fprintf(stderr, "invalid arguments\n");
|
|
559
|
-
return;
|
|
563
|
+
return -1;
|
|
560
564
|
}
|
|
561
565
|
r = UPNP_DeletePinhole(urls->controlURL_6FC, data->IPv6FC.servicetype, uniqueID);
|
|
562
566
|
printf("UPNP_DeletePinhole() returned : %d\n", r);
|
|
567
|
+
return r;
|
|
563
568
|
}
|
|
564
569
|
|
|
565
570
|
static void usage(FILE * out, const char * argv0) {
|
|
@@ -863,10 +868,11 @@ int main(int argc, char ** argv)
|
|
|
863
868
|
}
|
|
864
869
|
break;
|
|
865
870
|
case 'A':
|
|
866
|
-
SetPinholeAndTest(&urls, &data,
|
|
871
|
+
if (SetPinholeAndTest(&urls, &data,
|
|
867
872
|
commandargv[0], commandargv[1],
|
|
868
873
|
commandargv[2], commandargv[3],
|
|
869
|
-
commandargv[4], commandargv[5])
|
|
874
|
+
commandargv[4], commandargv[5]) < 0)
|
|
875
|
+
retcode = 2;
|
|
870
876
|
break;
|
|
871
877
|
case 'U':
|
|
872
878
|
GetPinholeAndUpdate(&urls, &data,
|
|
@@ -887,7 +893,8 @@ int main(int argc, char ** argv)
|
|
|
887
893
|
case 'D':
|
|
888
894
|
for(i=0; i<commandargc; i++)
|
|
889
895
|
{
|
|
890
|
-
RemovePinhole(&urls, &data, commandargv[i])
|
|
896
|
+
if (RemovePinhole(&urls, &data, commandargv[i]) < 0)
|
|
897
|
+
retcode = 2;
|
|
891
898
|
}
|
|
892
899
|
break;
|
|
893
900
|
case 'S':
|
miniupnpc-2.2.7/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.2.7
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|