mirror of
https://github.com/transmission/transmission
synced 2025-03-13 07:33:02 +00:00
update to miniupnpc-1.0
This commit is contained in:
parent
8850f7b070
commit
a9757c9c4f
7 changed files with 145 additions and 56 deletions
2
third-party/miniupnp/README
vendored
2
third-party/miniupnp/README
vendored
|
@ -1,3 +1,3 @@
|
|||
MiniUPnP is written by Thomas Bernard.
|
||||
Its homepage is http://miniupnp.free.fr/
|
||||
This code is from the miniupnpc-20071213 snapshot
|
||||
This is from version 1.0 of miniupnpc
|
||||
|
|
25
third-party/miniupnp/minisoap.c
vendored
25
third-party/miniupnp/minisoap.c
vendored
|
@ -1,4 +1,4 @@
|
|||
/* $Id: minisoap.c,v 1.14 2008/02/16 23:46:11 nanard Exp $ */
|
||||
/* $Id: minisoap.c,v 1.15 2008/02/17 17:57:07 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Author : Thomas Bernard
|
||||
* Copyright (c) 2005 Thomas Bernard
|
||||
|
@ -44,6 +44,8 @@ httpWrite(int fd, const char * body, int bodysize,
|
|||
char * p;
|
||||
/* TODO: AVOID MALLOC */
|
||||
p = malloc(headerssize+bodysize);
|
||||
if(!p)
|
||||
return 0;
|
||||
memcpy(p, headers, headerssize);
|
||||
memcpy(p+headerssize, body, bodysize);
|
||||
/*n = write(fd, p, headerssize+bodysize);*/
|
||||
|
@ -75,24 +77,35 @@ int soapPostSubmit(int fd,
|
|||
const char * body)
|
||||
{
|
||||
int bodysize;
|
||||
char headerbuf[1024];
|
||||
char headerbuf[512];
|
||||
int headerssize;
|
||||
char portstr[8];
|
||||
bodysize = (int)strlen(body);
|
||||
/* We are not using keep-alive HTTP connections.
|
||||
* HTTP/1.1 needs the header Connection: close to do that.
|
||||
* This is the default with HTTP/1.0 */
|
||||
/* Connection: Close is normally there only in HTTP/1.1 but who knows */
|
||||
portstr[0] = '\0';
|
||||
if(port != 80)
|
||||
snprintf(portstr, sizeof(portstr), ":%hu", port);
|
||||
headerssize = snprintf(headerbuf, sizeof(headerbuf),
|
||||
/* "POST %s HTTP/1.1\r\n"*/
|
||||
"POST %s HTTP/1.0\r\n"
|
||||
"Host: %s:%d\r\n"
|
||||
"POST %s HTTP/1.1\r\n"
|
||||
/* "POST %s HTTP/1.0\r\n"*/
|
||||
"Host: %s%s\r\n"
|
||||
"User-Agent: POSIX, UPnP/1.0, miniUPnPc/1.0\r\n"
|
||||
"Content-Length: %d\r\n"
|
||||
"Content-Type: text/xml\r\n"
|
||||
"SOAPAction: \"%s\"\r\n"
|
||||
"Connection: Close\r\n"
|
||||
"Cache-Control: no-cache\r\n" /* ??? */
|
||||
"Pragma: no-cache\r\n"
|
||||
"\r\n",
|
||||
url, host, port, bodysize, action);
|
||||
url, host, portstr, bodysize, action);
|
||||
#ifdef DEBUG
|
||||
printf("SOAP request : headersize=%d bodysize=%d\n",
|
||||
headerssize, bodysize);
|
||||
/*printf("%s", headerbuf);*/
|
||||
#endif
|
||||
return httpWrite(fd, body, bodysize, headerbuf, headerssize);
|
||||
}
|
||||
|
||||
|
|
28
third-party/miniupnp/miniupnpc.c
vendored
28
third-party/miniupnp/miniupnpc.c
vendored
|
@ -1,4 +1,4 @@
|
|||
/* $Id: miniupnpc.c,v 1.50 2008/02/03 22:19:45 nanard Exp $ */
|
||||
/* $Id: miniupnpc.c,v 1.52 2008/02/18 13:28:33 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Author : Thomas BERNARD
|
||||
* copyright (c) 2005-2007 Thomas Bernard
|
||||
|
@ -128,7 +128,9 @@ getContentLengthAndHeaderLength(char * p, int n,
|
|||
|
||||
/* simpleUPnPcommand :
|
||||
* not so simple !
|
||||
* TODO: return some error codes */
|
||||
* return values :
|
||||
* 0 - OK
|
||||
* -1 - error */
|
||||
int simpleUPnPcommand(int s, const char * url, const char * service,
|
||||
const char * action, struct UPNParg * args,
|
||||
char * buffer, int * bufsize)
|
||||
|
@ -221,18 +223,32 @@ int simpleUPnPcommand(int s, const char * url, const char * service,
|
|||
if(s<0)
|
||||
{
|
||||
s = socket(PF_INET, SOCK_STREAM, 0);
|
||||
if(s<0)
|
||||
{
|
||||
PRINT_SOCKET_ERROR("socket");
|
||||
*bufsize = 0;
|
||||
return -1;
|
||||
}
|
||||
dest.sin_family = AF_INET;
|
||||
dest.sin_port = htons(port);
|
||||
dest.sin_addr.s_addr = inet_addr(hostname);
|
||||
if(connect(s, (struct sockaddr *)&dest, sizeof(struct sockaddr))<0)
|
||||
{
|
||||
PRINT_SOCKET_ERROR("connect");
|
||||
closesocket(s);
|
||||
*bufsize = 0;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
n = soapPostSubmit(s, path, hostname, port, soapact, soapbody);
|
||||
if(n<=0) {
|
||||
#ifdef DEBUG
|
||||
printf("Error sending SOAP request\n");
|
||||
#endif
|
||||
closesocket(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
contentlen = -1;
|
||||
headerlen = -1;
|
||||
|
@ -246,15 +262,16 @@ int simpleUPnPcommand(int s, const char * url, const char * service,
|
|||
getContentLengthAndHeaderLength(buffer, *bufsize,
|
||||
&contentlen, &headerlen);
|
||||
#ifdef DEBUG
|
||||
printf("n=%d bufsize=%d ContLen=%d HeadLen=%d\n",
|
||||
printf("received n=%dbytes bufsize=%d ContLen=%d HeadLen=%d\n",
|
||||
n, *bufsize, contentlen, headerlen);
|
||||
#endif
|
||||
/* break if we received everything */
|
||||
if(contentlen > 0 && headerlen > 0 && *bufsize >= contentlen+headerlen)
|
||||
break;
|
||||
}
|
||||
|
||||
closesocket(s);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* parseMSEARCHReply()
|
||||
|
@ -619,7 +636,8 @@ UPNPIGD_IsConnected(struct UPNPUrls * urls, struct IGDdatas * data)
|
|||
char status[64];
|
||||
unsigned int uptime;
|
||||
status[0] = '\0';
|
||||
UPNP_GetStatusInfo(urls->controlURL, data->servicetype, status, &uptime);
|
||||
UPNP_GetStatusInfo(urls->controlURL, data->servicetype,
|
||||
status, &uptime, NULL);
|
||||
if(0 == strcmp("Connected", status))
|
||||
{
|
||||
return 1;
|
||||
|
|
99
third-party/miniupnp/upnpcommands.c
vendored
99
third-party/miniupnp/upnpcommands.c
vendored
|
@ -1,4 +1,4 @@
|
|||
/* $Id: upnpcommands.c,v 1.18 2007/12/19 14:56:14 nanard Exp $ */
|
||||
/* $Id: upnpcommands.c,v 1.19 2008/02/18 13:27:23 nanard Exp $ */
|
||||
/* Project : miniupnp
|
||||
* Author : Thomas Bernard
|
||||
* Copyright (c) 2005 Thomas Bernard
|
||||
|
@ -14,7 +14,7 @@
|
|||
static unsigned int
|
||||
my_atoui(const char * s)
|
||||
{
|
||||
return (unsigned int)strtoul(s, NULL, 0);
|
||||
return s ? ((unsigned int)strtoul(s, NULL, 0)) : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -32,8 +32,7 @@ UPNP_GetTotalBytesSent(const char * controlURL,
|
|||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
p = GetValueFromNameValueList(&pdata, "NewTotalBytesSent");
|
||||
if(p)
|
||||
r = my_atoui(p);
|
||||
r = my_atoui(p);
|
||||
ClearNameValueList(&pdata);
|
||||
return r;
|
||||
}
|
||||
|
@ -53,8 +52,7 @@ UPNP_GetTotalBytesReceived(const char * controlURL,
|
|||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
p = GetValueFromNameValueList(&pdata, "NewTotalBytesReceived");
|
||||
if(p)
|
||||
r = my_atoui(p);
|
||||
r = my_atoui(p);
|
||||
ClearNameValueList(&pdata);
|
||||
return r;
|
||||
}
|
||||
|
@ -74,8 +72,7 @@ UPNP_GetTotalPacketsSent(const char * controlURL,
|
|||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
p = GetValueFromNameValueList(&pdata, "NewTotalPacketsSent");
|
||||
if(p)
|
||||
r = my_atoui(p);
|
||||
r = my_atoui(p);
|
||||
ClearNameValueList(&pdata);
|
||||
return r;
|
||||
}
|
||||
|
@ -95,36 +92,40 @@ UPNP_GetTotalPacketsReceived(const char * controlURL,
|
|||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
p = GetValueFromNameValueList(&pdata, "NewTotalPacketsReceived");
|
||||
if(p)
|
||||
r = my_atoui(p);
|
||||
r = my_atoui(p);
|
||||
ClearNameValueList(&pdata);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* UPNP_GetStatusInfo() call the corresponding UPNP method
|
||||
* returns the current status and uptime */
|
||||
void UPNP_GetStatusInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * status,
|
||||
unsigned int * uptime)
|
||||
int UPNP_GetStatusInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * status,
|
||||
unsigned int * uptime,
|
||||
char * lastconnerror)
|
||||
{
|
||||
struct NameValueParserData pdata;
|
||||
char buffer[4096];
|
||||
int bufsize = 4096;
|
||||
char * p;
|
||||
char* up;
|
||||
char * up;
|
||||
char * err;
|
||||
int ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
|
||||
if(!status && !uptime)
|
||||
return;
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
simpleUPnPcommand(-1, controlURL, servicetype, "GetStatusInfo", 0, buffer, &bufsize);
|
||||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
up = GetValueFromNameValueList(&pdata, "NewUptime");
|
||||
p = GetValueFromNameValueList(&pdata, "NewConnectionStatus");
|
||||
err = GetValueFromNameValueList(&pdata, "NewLastConnectionError");
|
||||
if(p && up)
|
||||
ret = UPNPCOMMAND_SUCCESS;
|
||||
|
||||
if(status)
|
||||
{
|
||||
if(status) {
|
||||
if(p){
|
||||
strncpy(status, p, 64 );
|
||||
status[63] = '\0';
|
||||
|
@ -132,30 +133,44 @@ void UPNP_GetStatusInfo(const char * controlURL,
|
|||
status[0]= '\0';
|
||||
}
|
||||
|
||||
if(uptime){
|
||||
if(uptime) {
|
||||
if(up)
|
||||
sscanf(up,"%u",uptime);
|
||||
else
|
||||
uptime = 0;
|
||||
}
|
||||
|
||||
if(lastconnerror) {
|
||||
if(err) {
|
||||
strncpy(lastconnerror, err, 64 );
|
||||
lastconnerror[63] = '\0';
|
||||
} else
|
||||
lastconnerror[0] = '\0';
|
||||
}
|
||||
|
||||
p = GetValueFromNameValueList(&pdata, "errorCode");
|
||||
if(p) {
|
||||
ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
sscanf(p, "%d", &ret);
|
||||
}
|
||||
ClearNameValueList(&pdata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* UPNP_GetConnectionTypeInfo() call the corresponding UPNP method
|
||||
* returns the connection type */
|
||||
void UPNP_GetConnectionTypeInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * connectionType)
|
||||
int UPNP_GetConnectionTypeInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * connectionType)
|
||||
{
|
||||
struct NameValueParserData pdata;
|
||||
char buffer[4096];
|
||||
int bufsize = 4096;
|
||||
char * p;
|
||||
int ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
|
||||
if(!connectionType)
|
||||
return;
|
||||
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
"GetConnectionTypeInfo", 0, buffer, &bufsize);
|
||||
|
@ -163,15 +178,19 @@ void UPNP_GetConnectionTypeInfo(const char * controlURL,
|
|||
p = GetValueFromNameValueList(&pdata, "NewConnectionType");
|
||||
/*p = GetValueFromNameValueList(&pdata, "NewPossibleConnectionTypes");*/
|
||||
/* PossibleConnectionTypes will have several values.... */
|
||||
if(connectionType)
|
||||
{
|
||||
if(p){
|
||||
strncpy(connectionType, p, 64 );
|
||||
connectionType[63] = '\0';
|
||||
} else
|
||||
connectionType[0] = '\0';
|
||||
if(p) {
|
||||
strncpy(connectionType, p, 64 );
|
||||
connectionType[63] = '\0';
|
||||
ret = UPNPCOMMAND_SUCCESS;
|
||||
} else
|
||||
connectionType[0] = '\0';
|
||||
p = GetValueFromNameValueList(&pdata, "errorCode");
|
||||
if(p) {
|
||||
ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
sscanf(p, "%d", &ret);
|
||||
}
|
||||
ClearNameValueList(&pdata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* UPNP_GetLinkLayerMaxBitRate() call the corresponding UPNP method.
|
||||
|
@ -179,16 +198,18 @@ void UPNP_GetConnectionTypeInfo(const char * controlURL,
|
|||
* One of the values can be null
|
||||
* Note : GetLinkLayerMaxBitRates belongs to WANPPPConnection:1 only
|
||||
* We can use the GetCommonLinkProperties from WANCommonInterfaceConfig:1 */
|
||||
void UPNP_GetLinkLayerMaxBitRates(const char * controlURL, const char * servicetype, unsigned int * bitrateDown, unsigned int* bitrateUp)
|
||||
int UPNP_GetLinkLayerMaxBitRates(const char * controlURL, const char * servicetype, unsigned int * bitrateDown, unsigned int* bitrateUp)
|
||||
{
|
||||
struct NameValueParserData pdata;
|
||||
char buffer[4096];
|
||||
int bufsize = 4096;
|
||||
int ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
char * down;
|
||||
char* up;
|
||||
char * up;
|
||||
char * p;
|
||||
|
||||
if(!bitrateDown && !bitrateUp)
|
||||
return;
|
||||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
/* shouldn't we use GetCommonLinkProperties ? */
|
||||
simpleUPnPcommand(-1, controlURL, servicetype,
|
||||
|
@ -202,6 +223,8 @@ void UPNP_GetLinkLayerMaxBitRates(const char * controlURL, const char * servicet
|
|||
up = GetValueFromNameValueList(&pdata, "NewLayer1UpstreamMaxBitRate");
|
||||
/*GetValueFromNameValueList(&pdata, "NewWANAccessType");*/
|
||||
/*GetValueFromNameValueList(&pdata, "NewPhysicalLinkSatus");*/
|
||||
if(down && up)
|
||||
ret = UPNPCOMMAND_SUCCESS;
|
||||
|
||||
if(bitrateDown)
|
||||
{
|
||||
|
@ -218,7 +241,13 @@ void UPNP_GetLinkLayerMaxBitRates(const char * controlURL, const char * servicet
|
|||
else
|
||||
*bitrateUp = 0;
|
||||
}
|
||||
p = GetValueFromNameValueList(&pdata, "errorCode");
|
||||
if(p) {
|
||||
ret = UPNPCOMMAND_UNKNOWN_ERROR;
|
||||
sscanf(p, "%d", &ret);
|
||||
}
|
||||
ClearNameValueList(&pdata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -247,7 +276,6 @@ int UPNP_GetExternalIPAddress(const char * controlURL,
|
|||
return UPNPCOMMAND_INVALID_ARGS;
|
||||
|
||||
simpleUPnPcommand(-1, controlURL, servicetype, "GetExternalIPAddress", 0, buffer, &bufsize);
|
||||
/*fd = simpleUPnPcommand(fd, controlURL, data.servicetype, "GetExternalIPAddress", 0, buffer, &bufsize);*/
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
ParseNameValue(buffer, bufsize, &pdata);
|
||||
/*printf("external ip = %s\n", GetValueFromNameValueList(&pdata, "NewExternalIPAddress") );*/
|
||||
|
@ -304,7 +332,6 @@ UPNP_AddPortMapping(const char * controlURL, const char * servicetype,
|
|||
AddPortMappingArgs[7].elt = "NewLeaseDuration";
|
||||
AddPortMappingArgs[7].val = "0";
|
||||
simpleUPnPcommand(-1, controlURL, servicetype, "AddPortMapping", AddPortMappingArgs, buffer, &bufsize);
|
||||
/*fd = simpleUPnPcommand(fd, controlURL, data.servicetype, "AddPortMapping", AddPortMappingArgs, buffer, &bufsize);*/
|
||||
/*DisplayNameValueList(buffer, bufsize);*/
|
||||
/*buffer[bufsize] = '\0';*/
|
||||
/*puts(buffer);*/
|
||||
|
|
39
third-party/miniupnp/upnpcommands.h
vendored
39
third-party/miniupnp/upnpcommands.h
vendored
|
@ -1,4 +1,4 @@
|
|||
/* $Id: upnpcommands.h,v 1.12 2007/12/19 14:56:15 nanard Exp $ */
|
||||
/* $Id: upnpcommands.h,v 1.13 2008/02/18 13:27:24 nanard Exp $ */
|
||||
/* Miniupnp project : http://miniupnp.free.fr/
|
||||
* Author : Thomas Bernard
|
||||
* Copyright (c) 2005-2006 Thomas Bernard
|
||||
|
@ -35,13 +35,24 @@ LIBSPEC unsigned int
|
|||
UPNP_GetTotalPacketsReceived(const char * controlURL,
|
||||
const char * servicetype);
|
||||
|
||||
LIBSPEC void
|
||||
/* UPNP_GetStatusInfo()
|
||||
* status and lastconnerror are 64 byte buffers
|
||||
* Return values :
|
||||
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
|
||||
* or a UPnP Error code */
|
||||
LIBSPEC int
|
||||
UPNP_GetStatusInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * status,
|
||||
unsigned int * uptime);
|
||||
unsigned int * uptime,
|
||||
char * lastconnerror);
|
||||
|
||||
LIBSPEC void
|
||||
/* UPNP_GetConnectionTypeInfo()
|
||||
* argument connectionType is a 64 character buffer
|
||||
* Return Values :
|
||||
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
|
||||
* or a UPnP Error code */
|
||||
LIBSPEC int
|
||||
UPNP_GetConnectionTypeInfo(const char * controlURL,
|
||||
const char * servicetype,
|
||||
char * connectionType);
|
||||
|
@ -62,7 +73,13 @@ UPNP_GetExternalIPAddress(const char * controlURL,
|
|||
const char * servicetype,
|
||||
char * extIpAdd);
|
||||
|
||||
LIBSPEC void
|
||||
/* UPNP_GetLinkLayerMaxBitRates()
|
||||
* call WANCommonInterfaceConfig:1#GetCommonLinkProperties
|
||||
*
|
||||
* return values :
|
||||
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
|
||||
* or a UPnP Error Code. */
|
||||
LIBSPEC int
|
||||
UPNP_GetLinkLayerMaxBitRates(const char* controlURL,
|
||||
const char* servicetype,
|
||||
unsigned int * bitrateDown,
|
||||
|
@ -111,12 +128,18 @@ LIBSPEC int
|
|||
UPNP_DeletePortMapping(const char * controlURL, const char * servicetype,
|
||||
const char * extPort, const char * proto);
|
||||
|
||||
/* UPNP_GetPortMappingNumberOfEntries()
|
||||
* not supported by all routers */
|
||||
LIBSPEC int
|
||||
UPNP_GetPortMappingNumberOfEntries(const char* controlURL, const char* servicetype, unsigned int * num);
|
||||
|
||||
/* UPNP_GetSpecificPortMappingEntry retrieves an existing port mapping
|
||||
* the result is returned in the intClient and intPort strings
|
||||
* please provide 16 and 6 bytes of data */
|
||||
* please provide 16 and 6 bytes of data
|
||||
*
|
||||
* return value :
|
||||
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
|
||||
* or a UPnP Error Code. */
|
||||
LIBSPEC int
|
||||
UPNP_GetSpecificPortMappingEntry(const char * controlURL,
|
||||
const char * servicetype,
|
||||
|
@ -126,6 +149,10 @@ UPNP_GetSpecificPortMappingEntry(const char * controlURL,
|
|||
char * intPort);
|
||||
|
||||
/* UPNP_GetGenericPortMappingEntry()
|
||||
*
|
||||
* return value :
|
||||
* UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR
|
||||
* or a UPnP Error Code.
|
||||
*
|
||||
* Possible UPNP Error codes :
|
||||
* 402 Invalid Args - See UPnP Device Architecture section on Control.
|
||||
|
|
4
third-party/miniupnp/upnpreplyparse.c
vendored
4
third-party/miniupnp/upnpreplyparse.c
vendored
|
@ -1,4 +1,4 @@
|
|||
/* $Id: upnpreplyparse.c,v 1.9 2007/05/15 18:14:08 nanard Exp $ */
|
||||
/* $Id: upnpreplyparse.c,v 1.10 2008/02/21 13:05:27 nanard Exp $ */
|
||||
/* MiniUPnP project
|
||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||
* (c) 2006 Thomas Bernard
|
||||
|
@ -108,6 +108,7 @@ GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata,
|
|||
|
||||
/* debug all-in-one function
|
||||
* do parsing then display to stdout */
|
||||
#ifdef DEBUG
|
||||
void
|
||||
DisplayNameValueList(char * buffer, int bufsize)
|
||||
{
|
||||
|
@ -122,4 +123,5 @@ DisplayNameValueList(char * buffer, int bufsize)
|
|||
}
|
||||
ClearNameValueList(&pdata);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
4
third-party/miniupnp/upnpreplyparse.h
vendored
4
third-party/miniupnp/upnpreplyparse.h
vendored
|
@ -1,4 +1,4 @@
|
|||
/* $Id: upnpreplyparse.h,v 1.7 2007/10/06 10:02:54 nanard Exp $ */
|
||||
/* $Id: upnpreplyparse.h,v 1.8 2008/02/21 13:05:27 nanard Exp $ */
|
||||
/* MiniUPnP project
|
||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||
* (c) 2006 Thomas Bernard
|
||||
|
@ -49,8 +49,10 @@ GetValueFromNameValueListIgnoreNS(struct NameValueParserData * pdata,
|
|||
const char * Name);
|
||||
|
||||
/* DisplayNameValueList() */
|
||||
#ifdef DEBUG
|
||||
void
|
||||
DisplayNameValueList(char * buffer, int bufsize);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue