From a677dccc4d7a955b21c7a19969e7837d632fcccb Mon Sep 17 00:00:00 2001 From: Dmytro Milinevskyy Date: Wed, 19 Jul 2017 13:44:26 +0200 Subject: [PATCH] miniupnpc:py: allow desc and remote to be None for addportmapping and addanyportmapping --- miniupnpc/miniupnpcmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpc/miniupnpcmodule.c b/miniupnpc/miniupnpcmodule.c index 73bd2ea..8ffbf51 100644 --- a/miniupnpc/miniupnpcmodule.c +++ b/miniupnpc/miniupnpcmodule.c @@ -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);