Changeset 7837


Ignore:
Timestamp:
Feb 7, 2009, 12:11:58 AM (13 years ago)
Author:
charles
Message:

(trunk libT) update to the newest versions of miniupnp and libnatpmp

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/upnp.c

    r7658 r7837  
    134134        UPNP_DeletePortMapping( handle->urls.controlURL,
    135135                                handle->data.servicetype,
    136                                 portStr, "TCP" );
     136                                portStr, "TCP", NULL );
    137137        tr_ninf( getKey( ),
    138138                 _(
     
    166166                                       handle->data.servicetype,
    167167                                       portStr, portStr, handle->lanaddr,
    168                                        desc, "TCP" );
     168                                       desc, "TCP", NULL );
    169169            handle->isMapped = !err;
    170170        }
  • trunk/third-party/libnatpmp/README

    r6967 r7837  
    11libnatpmp is written by Thomas Bernard.
    22Its homepage is http://miniupnp.tuxfamily.org/libnatpmp.html
    3 This code is from the libnatpmp-20081006 snapshot
     3This code is from the libnatpmp-20090129 snapshot
    44
  • trunk/third-party/miniupnp/Changelog.txt

    r6848 r7837  
    1 $Id: Changelog.txt,v 1.72 2008/09/25 18:02:50 nanard Exp $
     1$Id: Changelog.txt,v 1.77 2008/12/18 17:47:32 nanard Exp $
    22miniUPnP client Changelog.
     3
     42008/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
     102008/10/14:
     11  Added the ExternalHost argument to DeletePortMapping()
     12
     132008/10/11:
     14  Added the ExternalHost argument to AddPortMapping()
     15  Put a correct User-Agent: header in HTTP requests.
     16
     17VERSION 1.2 :
     18
     192008/10/07:
     20  Update docs
    321
    4222008/09/25:
  • trunk/third-party/miniupnp/README

    r6967 r7837  
    11MiniUPnP is written by Thomas Bernard.
    22Its homepage is http://miniupnp.free.fr/
    3 This is from the miniupnpc-1.2 tarball (7 Oct 2008)
     3This is from miniupnpc-20090129.tar.gz
  • trunk/third-party/miniupnp/minisoap.c

    r5094 r7837  
    1 /* $Id: minisoap.c,v 1.15 2008/02/17 17:57:07 nanard Exp $ */
     1/* $Id: minisoap.c,v 1.16 2008/10/11 16:39:29 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas Bernard
     
    2020#endif
    2121#include "minisoap.h"
     22#include "miniupnpcstrings.h"
    2223
    2324/* only for malloc */
     
    9394/*                       "POST %s HTTP/1.0\r\n"*/
    9495                           "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"
    9697                           "Content-Length: %d\r\n"
    9798                                           "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:39 nanard Exp $ */
     1/* $Id: minissdpc.c,v 1.7 2008/12/18 17:45:48 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas BERNARD
     
    1111#include <unistd.h>
    1212#include <sys/types.h>
     13#ifdef WIN32
     14#include <winsock2.h>
     15#include <Ws2tcpip.h>
     16#include <io.h>
     17#else
    1318#include <sys/socket.h>
    1419#include <sys/un.h>
     20#endif
    1521
    1622#include "minissdpc.h"
  • trunk/third-party/miniupnp/miniupnpc.c

    r6848 r7837  
    1 /* $Id: miniupnpc.c,v 1.55 2008/09/25 18:02:50 nanard Exp $ */
     1/* $Id: miniupnpc.c,v 1.57 2008/12/18 17:46:36 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas BERNARD
     
    99#include <string.h>
    1010#ifdef WIN32
     11/* Win32 Specific includes and defines */
    1112#include <winsock2.h>
    1213#include <Ws2tcpip.h>
    1314#include <io.h>
    1415#define snprintf _snprintf
     16#if defined(_MSC_VER) && (_MSC_VER >= 1400)
     17#define strncasecmp _memicmp
     18#else
    1519#define strncasecmp memicmp
     20#endif
    1621#define MAXHOSTNAMELEN 64
    1722#else
     23/* Standard POSIX includes */
    1824#include <unistd.h>
    1925#include <sys/socket.h>
     
    4046
    4147#define SOAPPREFIX "s"
     48#define SERVICEPREFIX "u"
     49#define SERVICEPREFIX2 'u'
    4250
    4351/* root description parsing */
     
    5462        parser.attfunc = 0;
    5563        parsexml(&parser);
    56 #ifndef NDEBUG
     64#ifdef DEBUG
    5765        printIGD(data);
    5866#endif
     
    151159                                                  SOAPPREFIX ":encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
    152160                                                  "<" SOAPPREFIX ":Body>"
    153                                                   "<m:%s xmlns:m=\"%s\">"
    154                                                   "</m:%s>"
     161                                                  "<" SERVICEPREFIX ":%s xmlns:" SERVICEPREFIX "=\"%s\">"
     162                                                  "</" SERVICEPREFIX ":%s>"
    155163                                                  "</" SOAPPREFIX ":Body></" SOAPPREFIX ":Envelope>"
    156164                                                  "\r\n", action, service, action);
     
    167175                                                SOAPPREFIX ":encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
    168176                                                "<" SOAPPREFIX ":Body>"
    169                                                 "<m:%s xmlns:m=\"%s\">",
     177                                                "<" SERVICEPREFIX ":%s xmlns:" SERVICEPREFIX "=\"%s\">",
    170178                                                action, service);
    171179                p = soapbody + soapbodylen;
     
    199207                *(p++) = '<';
    200208                *(p++) = '/';
    201                 *(p++) = 'm';
     209                *(p++) = SERVICEPREFIX2;
    202210                *(p++) = ':';
    203211                pe = action;
  • trunk/third-party/miniupnp/miniwget.c

    r3731 r7837  
    1 /* $Id: miniwget.c,v 1.19 2007/11/02 14:16:19 nanard Exp $ */
     1/* $Id: miniwget.c,v 1.21 2008/12/18 17:45:18 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas Bernard
     
    3232#endif
    3333
     34#include "miniupnpcstrings.h"
     35
    3436/* miniwget2() :
    3537 * */
     
    9799                             "Host: %s:%d\r\n"
    98100                                 "Connection: Close\r\n"
     101                                 "User-Agent: " OS_STRING ", UPnP/1.0, MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
     102
    99103                                 "\r\n",
    100104                    path, host, port);
     
    138142                }
    139143                *size = allreadyread;
    140 #ifndef NDEBUG
     144#ifdef DEBUG
    141145                printf("%d bytes read\n", *size);
    142146#endif
  • trunk/third-party/miniupnp/upnpcommands.c

    r5094 r7837  
    1 /* $Id: upnpcommands.c,v 1.19 2008/02/18 13:27:23 nanard Exp $ */
     1/* $Id: upnpcommands.c,v 1.22 2008/12/18 17:45:18 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas Bernard
    4  * Copyright (c) 2005 Thomas Bernard
     4 * Copyright (c) 2005-2008 Thomas Bernard
    55 * This software is subject to the conditions detailed in the
    66 * LICENCE file provided in this distribution.
     
    304304                                        const char * inClient,
    305305                                        const char * desc,
    306                                         const char * proto)
     306                                        const char * proto,
     307                    const char * remoteHost)
    307308{
    308309        struct UPNParg * AddPortMappingArgs;
     
    318319        AddPortMappingArgs = calloc(9, sizeof(struct UPNParg));
    319320        AddPortMappingArgs[0].elt = "NewRemoteHost";
     321        AddPortMappingArgs[0].val = remoteHost;
    320322        AddPortMappingArgs[1].elt = "NewExternalPort";
    321323        AddPortMappingArgs[1].val = extPort;
     
    352354int
    353355UPNP_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)
    355358{
    356359        /*struct NameValueParserData pdata;*/
     
    367370        DeletePortMappingArgs = calloc(4, sizeof(struct UPNParg));
    368371        DeletePortMappingArgs[0].elt = "NewRemoteHost";
     372        DeletePortMappingArgs[0].val = remoteHost;
    369373        DeletePortMappingArgs[1].elt = "NewExternalPort";
    370374        DeletePortMappingArgs[1].val = extPort;
     
    485489        int ret = UPNPCOMMAND_UNKNOWN_ERROR;
    486490        simpleUPnPcommand(-1, controlURL, servicetype, "GetPortMappingNumberOfEntries", 0, buffer, &bufsize);
    487 #ifndef NDEBUG
     491#ifdef DEBUG
    488492        DisplayNameValueList(buffer, bufsize);
    489493#endif
  • trunk/third-party/miniupnp/upnpcommands.h

    r6848 r7837  
    1 /* $Id: upnpcommands.h,v 1.14 2008/09/25 18:02:50 nanard Exp $ */
     1/* $Id: upnpcommands.h,v 1.16 2008/10/14 18:05:28 nanard Exp $ */
    22/* Miniupnp project : http://miniupnp.free.fr/
    33 * Author : Thomas Bernard
     
    8787
    8888/* UPNP_AddPortMapping()
     89 * if desc is NULL, it will be defaulted to "libminiupnpc"
     90 * remoteHost is usually NULL because IGD don't support it.
    8991 *
    9092 * Return values :
     
    115117                                        const char * inClient,
    116118                                        const char * desc,
    117                     const char * proto);
     119                    const char * proto,
     120                    const char * remoteHost);
    118121
    119122/* UPNP_DeletePortMapping()
     123 * Use same argument values as what was used for AddPortMapping().
     124 * remoteHost is usually NULL because IGD don't support it.
    120125 * Return Values :
    121126 * 0 : SUCCESS
     
    127132LIBSPEC int
    128133UPNP_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);
    130136
    131137/* UPNP_GetPortMappingNumberOfEntries()
Note: See TracChangeset for help on using the changeset viewer.