mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-11 22:54:17 +00:00
miniupnpc:py: allow desc and remote to be None for addportmapping and addanyportmapping
This commit is contained in:
parent
ae0c3489bf
commit
a677dccc4d
@ -307,7 +307,7 @@ UPnP_addportmapping(UPnPObject *self, PyObject *args)
|
||||
const char * remoteHost;
|
||||
const char * leaseDuration = "0";
|
||||
int r;
|
||||
if (!PyArg_ParseTuple(args, "HssHss", &ePort, &proto,
|
||||
if (!PyArg_ParseTuple(args, "HssHzz", &ePort, &proto,
|
||||
&host, &iPort, &desc, &remoteHost))
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
@ -349,7 +349,7 @@ UPnP_addanyportmapping(UPnPObject *self, PyObject *args)
|
||||
const char * remoteHost;
|
||||
const char * leaseDuration = "0";
|
||||
int r;
|
||||
if (!PyArg_ParseTuple(args, "HssHss", &ePort, &proto, &host, &iPort, &desc, &remoteHost))
|
||||
if (!PyArg_ParseTuple(args, "HssHzz", &ePort, &proto, &host, &iPort, &desc, &remoteHost))
|
||||
return NULL;
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sprintf(extPort, "%hu", ePort);
|
||||
|
Loading…
x
Reference in New Issue
Block a user