miniupnpc/miniupnpcmodule.c: small fix
This commit is contained in:
parent
4931404b8a
commit
b7e1b2ef09
|
@ -1,6 +1,10 @@
|
||||||
$Id: Changelog.txt,v 1.229 2017/12/12 11:26:25 nanard Exp $
|
$Id: Changelog.txt,v 1.229 2017/12/12 11:26:25 nanard Exp $
|
||||||
miniUPnP client Changelog.
|
miniUPnP client Changelog.
|
||||||
|
|
||||||
|
2018/04/26:
|
||||||
|
Small fix in miniupnpcmodule.c (python module)
|
||||||
|
Support cross compiling in Makefile.mingw
|
||||||
|
|
||||||
2018/04/06:
|
2018/04/06:
|
||||||
Use SOCKET type instead of int (for Win64 compilation)
|
Use SOCKET type instead of int (for Win64 compilation)
|
||||||
Increments API_VERSION to 17
|
Increments API_VERSION to 17
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* $Id: miniupnpcmodule.c,v 1.24 2014/06/10 09:48:11 nanard Exp $*/
|
/* $Id: miniupnpcmodule.c,v 1.24 2014/06/10 09:48:11 nanard Exp $*/
|
||||||
/* Project : miniupnp
|
/* Project : miniupnp
|
||||||
* Author : Thomas BERNARD
|
* Author : Thomas BERNARD
|
||||||
* website : http://miniupnp.tuxfamily.org/
|
* website : https://miniupnp.tuxfamily.org/
|
||||||
* copyright (c) 2007-2016 Thomas Bernard
|
* copyright (c) 2007-2018 Thomas Bernard
|
||||||
* This software is subjet to the conditions detailed in the
|
* This software is subjet to the conditions detailed in the
|
||||||
* provided LICENCE file. */
|
* provided LICENCE file. */
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
@ -405,14 +405,14 @@ UPnP_deleteportmappingrange(UPnPObject *self, PyObject *args)
|
||||||
unsigned short ePortEnd;
|
unsigned short ePortEnd;
|
||||||
const char * proto;
|
const char * proto;
|
||||||
unsigned char manage;
|
unsigned char manage;
|
||||||
char manageStr[1];
|
char manageStr[6];
|
||||||
int r;
|
int r;
|
||||||
if(!PyArg_ParseTuple(args, "HHsb", &ePortStart, &ePortEnd, &proto, &manage))
|
if(!PyArg_ParseTuple(args, "HHsb", &ePortStart, &ePortEnd, &proto, &manage))
|
||||||
return NULL;
|
return NULL;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
sprintf(extPortStart, "%hu", ePortStart);
|
sprintf(extPortStart, "%hu", ePortStart);
|
||||||
sprintf(extPortEnd, "%hu", ePortEnd);
|
sprintf(extPortEnd, "%hu", ePortEnd);
|
||||||
sprintf(manageStr, "%hhu", manage);
|
sprintf(manageStr, "%hu", (unsigned short)manage);
|
||||||
r = UPNP_DeletePortMappingRange(self->urls.controlURL, self->data.first.servicetype,
|
r = UPNP_DeletePortMappingRange(self->urls.controlURL, self->data.first.servicetype,
|
||||||
extPortStart, extPortEnd, proto, manageStr);
|
extPortStart, extPortEnd, proto, manageStr);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
|
|
Loading…
Reference in New Issue