added header to Port Mappings list in upnpc.c

This commit is contained in:
Thomas Bernard 2012-01-07 11:37:16 +01:00
parent 368e232179
commit e6a2c788f4
2 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,9 @@
$Id: Changelog.txt,v 1.153 2011/09/12 09:52:01 nanard Exp $
miniUPnP client Changelog.
2011/11/25:
added header to Port Mappings list in upnpc.c
2011/10/09:
Makefile : make clean now removes jnaerator generated files.
MINIUPNPC_VERSION in miniupnpc.h (updated by make)

View File

@ -119,6 +119,7 @@ static void ListRedirections(struct UPNPUrls * urls,
/*unsigned int num=0;
UPNP_GetPortMappingNumberOfEntries(urls->controlURL, data->servicetype, &num);
printf("PortMappingNumberOfEntries : %u\n", num);*/
printf(" i protocol exPort->inAddr:inPort description remoteHost leaseTime\n");
do {
snprintf(index, 6, "%d", i);
rHost[0] = '\0'; enabled[0] = '\0';
@ -166,6 +167,7 @@ static void NewListRedirections(struct UPNPUrls * urls,
&pdata);
if(r == UPNPCOMMAND_SUCCESS)
{
printf(" i protocol exPort->inAddr:inPort description remoteHost leaseTime\n");
for(pm = pdata.head.lh_first; pm != NULL; pm = pm->entries.le_next)
{
printf("%2d %s %5hu->%s:%-5hu '%s' '%s' %u\n",