Changeset 7837
- Timestamp:
- Feb 7, 2009, 12:11:58 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/upnp.c
r7658 r7837 134 134 UPNP_DeletePortMapping( handle->urls.controlURL, 135 135 handle->data.servicetype, 136 portStr, "TCP" );136 portStr, "TCP", NULL ); 137 137 tr_ninf( getKey( ), 138 138 _( … … 166 166 handle->data.servicetype, 167 167 portStr, portStr, handle->lanaddr, 168 desc, "TCP" );168 desc, "TCP", NULL ); 169 169 handle->isMapped = !err; 170 170 } -
trunk/third-party/libnatpmp/README
r6967 r7837 1 1 libnatpmp is written by Thomas Bernard. 2 2 Its homepage is http://miniupnp.tuxfamily.org/libnatpmp.html 3 This code is from the libnatpmp-200 81006snapshot3 This code is from the libnatpmp-20090129 snapshot 4 4 -
trunk/third-party/miniupnp/Changelog.txt
r6848 r7837 1 $Id: Changelog.txt,v 1.7 2 2008/09/25 18:02:50nanard Exp $1 $Id: Changelog.txt,v 1.77 2008/12/18 17:47:32 nanard Exp $ 2 2 miniUPnP client Changelog. 3 4 2008/12/18: 5 cleanup in Makefile (thanks to Paul de Weerd) 6 minissdpc.c : win32 compatibility 7 miniupnpc.c : changed xmlns prefix from 'm' to 'u' 8 Removed NDEBUG (using DEBUG) 9 10 2008/10/14: 11 Added the ExternalHost argument to DeletePortMapping() 12 13 2008/10/11: 14 Added the ExternalHost argument to AddPortMapping() 15 Put a correct User-Agent: header in HTTP requests. 16 17 VERSION 1.2 : 18 19 2008/10/07: 20 Update docs 3 21 4 22 2008/09/25: -
trunk/third-party/miniupnp/README
r6967 r7837 1 1 MiniUPnP is written by Thomas Bernard. 2 2 Its homepage is http://miniupnp.free.fr/ 3 This is from the miniupnpc-1.2 tarball (7 Oct 2008)3 This is from miniupnpc-20090129.tar.gz -
trunk/third-party/miniupnp/minisoap.c
r5094 r7837 1 /* $Id: minisoap.c,v 1.1 5 2008/02/17 17:57:07nanard Exp $ */1 /* $Id: minisoap.c,v 1.16 2008/10/11 16:39:29 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas Bernard … … 20 20 #endif 21 21 #include "minisoap.h" 22 #include "miniupnpcstrings.h" 22 23 23 24 /* only for malloc */ … … 93 94 /* "POST %s HTTP/1.0\r\n"*/ 94 95 "Host: %s%s\r\n" 95 "User-Agent: POSIX, UPnP/1.0, miniUPnPc/1.0\r\n"96 "User-Agent: " OS_STRING ", UPnP/1.0, MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n" 96 97 "Content-Length: %d\r\n" 97 98 "Content-Type: text/xml\r\n" -
trunk/third-party/miniupnp/minissdpc.c
r6967 r7837 1 /* $Id: minissdpc.c,v 1. 6 2008/10/06 23:08:39nanard Exp $ */1 /* $Id: minissdpc.c,v 1.7 2008/12/18 17:45:48 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas BERNARD … … 11 11 #include <unistd.h> 12 12 #include <sys/types.h> 13 #ifdef WIN32 14 #include <winsock2.h> 15 #include <Ws2tcpip.h> 16 #include <io.h> 17 #else 13 18 #include <sys/socket.h> 14 19 #include <sys/un.h> 20 #endif 15 21 16 22 #include "minissdpc.h" -
trunk/third-party/miniupnp/miniupnpc.c
r6848 r7837 1 /* $Id: miniupnpc.c,v 1.5 5 2008/09/25 18:02:50nanard Exp $ */1 /* $Id: miniupnpc.c,v 1.57 2008/12/18 17:46:36 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas BERNARD … … 9 9 #include <string.h> 10 10 #ifdef WIN32 11 /* Win32 Specific includes and defines */ 11 12 #include <winsock2.h> 12 13 #include <Ws2tcpip.h> 13 14 #include <io.h> 14 15 #define snprintf _snprintf 16 #if defined(_MSC_VER) && (_MSC_VER >= 1400) 17 #define strncasecmp _memicmp 18 #else 15 19 #define strncasecmp memicmp 20 #endif 16 21 #define MAXHOSTNAMELEN 64 17 22 #else 23 /* Standard POSIX includes */ 18 24 #include <unistd.h> 19 25 #include <sys/socket.h> … … 40 46 41 47 #define SOAPPREFIX "s" 48 #define SERVICEPREFIX "u" 49 #define SERVICEPREFIX2 'u' 42 50 43 51 /* root description parsing */ … … 54 62 parser.attfunc = 0; 55 63 parsexml(&parser); 56 #if ndef NDEBUG64 #ifdef DEBUG 57 65 printIGD(data); 58 66 #endif … … 151 159 SOAPPREFIX ":encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" 152 160 "<" SOAPPREFIX ":Body>" 153 "< m:%s xmlns:m=\"%s\">"154 "</ m:%s>"161 "<" SERVICEPREFIX ":%s xmlns:" SERVICEPREFIX "=\"%s\">" 162 "</" SERVICEPREFIX ":%s>" 155 163 "</" SOAPPREFIX ":Body></" SOAPPREFIX ":Envelope>" 156 164 "\r\n", action, service, action); … … 167 175 SOAPPREFIX ":encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" 168 176 "<" SOAPPREFIX ":Body>" 169 "< m:%s xmlns:m=\"%s\">",177 "<" SERVICEPREFIX ":%s xmlns:" SERVICEPREFIX "=\"%s\">", 170 178 action, service); 171 179 p = soapbody + soapbodylen; … … 199 207 *(p++) = '<'; 200 208 *(p++) = '/'; 201 *(p++) = 'm';209 *(p++) = SERVICEPREFIX2; 202 210 *(p++) = ':'; 203 211 pe = action; -
trunk/third-party/miniupnp/miniwget.c
r3731 r7837 1 /* $Id: miniwget.c,v 1. 19 2007/11/02 14:16:19nanard Exp $ */1 /* $Id: miniwget.c,v 1.21 2008/12/18 17:45:18 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas Bernard … … 32 32 #endif 33 33 34 #include "miniupnpcstrings.h" 35 34 36 /* miniwget2() : 35 37 * */ … … 97 99 "Host: %s:%d\r\n" 98 100 "Connection: Close\r\n" 101 "User-Agent: " OS_STRING ", UPnP/1.0, MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n" 102 99 103 "\r\n", 100 104 path, host, port); … … 138 142 } 139 143 *size = allreadyread; 140 #if ndef NDEBUG144 #ifdef DEBUG 141 145 printf("%d bytes read\n", *size); 142 146 #endif -
trunk/third-party/miniupnp/upnpcommands.c
r5094 r7837 1 /* $Id: upnpcommands.c,v 1. 19 2008/02/18 13:27:23nanard Exp $ */1 /* $Id: upnpcommands.c,v 1.22 2008/12/18 17:45:18 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Author : Thomas Bernard 4 * Copyright (c) 2005 Thomas Bernard4 * Copyright (c) 2005-2008 Thomas Bernard 5 5 * This software is subject to the conditions detailed in the 6 6 * LICENCE file provided in this distribution. … … 304 304 const char * inClient, 305 305 const char * desc, 306 const char * proto) 306 const char * proto, 307 const char * remoteHost) 307 308 { 308 309 struct UPNParg * AddPortMappingArgs; … … 318 319 AddPortMappingArgs = calloc(9, sizeof(struct UPNParg)); 319 320 AddPortMappingArgs[0].elt = "NewRemoteHost"; 321 AddPortMappingArgs[0].val = remoteHost; 320 322 AddPortMappingArgs[1].elt = "NewExternalPort"; 321 323 AddPortMappingArgs[1].val = extPort; … … 352 354 int 353 355 UPNP_DeletePortMapping(const char * controlURL, const char * servicetype, 354 const char * extPort, const char * proto) 356 const char * extPort, const char * proto, 357 const char * remoteHost) 355 358 { 356 359 /*struct NameValueParserData pdata;*/ … … 367 370 DeletePortMappingArgs = calloc(4, sizeof(struct UPNParg)); 368 371 DeletePortMappingArgs[0].elt = "NewRemoteHost"; 372 DeletePortMappingArgs[0].val = remoteHost; 369 373 DeletePortMappingArgs[1].elt = "NewExternalPort"; 370 374 DeletePortMappingArgs[1].val = extPort; … … 485 489 int ret = UPNPCOMMAND_UNKNOWN_ERROR; 486 490 simpleUPnPcommand(-1, controlURL, servicetype, "GetPortMappingNumberOfEntries", 0, buffer, &bufsize); 487 #if ndef NDEBUG491 #ifdef DEBUG 488 492 DisplayNameValueList(buffer, bufsize); 489 493 #endif -
trunk/third-party/miniupnp/upnpcommands.h
r6848 r7837 1 /* $Id: upnpcommands.h,v 1.1 4 2008/09/25 18:02:50nanard Exp $ */1 /* $Id: upnpcommands.h,v 1.16 2008/10/14 18:05:28 nanard Exp $ */ 2 2 /* Miniupnp project : http://miniupnp.free.fr/ 3 3 * Author : Thomas Bernard … … 87 87 88 88 /* UPNP_AddPortMapping() 89 * if desc is NULL, it will be defaulted to "libminiupnpc" 90 * remoteHost is usually NULL because IGD don't support it. 89 91 * 90 92 * Return values : … … 115 117 const char * inClient, 116 118 const char * desc, 117 const char * proto); 119 const char * proto, 120 const char * remoteHost); 118 121 119 122 /* UPNP_DeletePortMapping() 123 * Use same argument values as what was used for AddPortMapping(). 124 * remoteHost is usually NULL because IGD don't support it. 120 125 * Return Values : 121 126 * 0 : SUCCESS … … 127 132 LIBSPEC int 128 133 UPNP_DeletePortMapping(const char * controlURL, const char * servicetype, 129 const char * extPort, const char * proto); 134 const char * extPort, const char * proto, 135 const char * remoteHost); 130 136 131 137 /* UPNP_GetPortMappingNumberOfEntries()
Note: See TracChangeset
for help on using the changeset viewer.