diff --git a/miniupnpc/Changelog.txt b/miniupnpc/Changelog.txt index ec7cbc1..4bfd77c 100644 --- a/miniupnpc/Changelog.txt +++ b/miniupnpc/Changelog.txt @@ -1,6 +1,9 @@ -$Id: Changelog.txt,v 1.197 2014/09/06 08:31:39 nanard Exp $ +$Id: Changelog.txt,v 1.198 2014/09/11 14:13:31 nanard Exp $ miniUPnP client Changelog. +2014/09/11: + use remoteHost arg of DeletePortMapping + 2014/09/06: Fix python3 build diff --git a/miniupnpc/upnpc.c b/miniupnpc/upnpc.c index e34b33c..7c06920 100644 --- a/miniupnpc/upnpc.c +++ b/miniupnpc/upnpc.c @@ -1,4 +1,4 @@ -/* $Id: upnpc.c,v 1.102 2014/02/05 17:27:14 nanard Exp $ */ +/* $Id: upnpc.c,v 1.104 2014/09/11 14:13:30 nanard Exp $ */ /* Project : miniupnp * Author : Thomas Bernard * Copyright (c) 2005-2014 Thomas Bernard @@ -295,8 +295,9 @@ static void SetRedirectAndTest(struct UPNPUrls * urls, static void RemoveRedirect(struct UPNPUrls * urls, struct IGDdatas * data, - const char * eport, - const char * proto) + const char * eport, + const char * proto, + const char * remoteHost) { int r; if(!proto || !eport) @@ -310,7 +311,7 @@ RemoveRedirect(struct UPNPUrls * urls, fprintf(stderr, "protocol invalid\n"); return; } - r = UPNP_DeletePortMapping(urls->controlURL, data->first.servicetype, eport, proto, 0); + r = UPNP_DeletePortMapping(urls->controlURL, data->first.servicetype, eport, proto, remoteHost); printf("UPNP_DeletePortMapping() returned : %d\n", r); } @@ -584,7 +585,7 @@ int main(int argc, char ** argv) || (command == 'D' && commandargc<1)) { fprintf(stderr, "Usage :\t%s [options] -a ip port external_port protocol [duration]\n\t\tAdd port redirection\n", argv[0]); - fprintf(stderr, " \t%s [options] -d external_port protocol [port2 protocol2] [...]\n\t\tDelete port redirection\n", argv[0]); + fprintf(stderr, " \t%s [options] -d external_port protocol \n\t\tDelete port redirection\n", argv[0]); fprintf(stderr, " \t%s [options] -s\n\t\tGet Connection status\n", argv[0]); fprintf(stderr, " \t%s [options] -l\n\t\tList redirections\n", argv[0]); fprintf(stderr, " \t%s [options] -L\n\t\tList redirections (using GetListOfPortMappings (for IGD:2 only)\n", argv[0]); @@ -677,10 +678,8 @@ int main(int argc, char ** argv) description, 0); break; case 'd': - for(i=0; i 2 ? commandargv[2] : NULL); break; case 'n': /* aNy */ SetRedirectAndTest(&urls, &data,