Changeset 8862


Ignore:
Timestamp:
Aug 2, 2009, 10:21:46 PM (12 years ago)
Author:
livings124
Message:

update miniupnpc to miniupnpc-20090729

Location:
trunk/third-party/miniupnp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/third-party/miniupnp/Changelog.txt

    r8798 r8862  
    1 $Id: Changelog.txt,v 1.82 2009/07/09 16:14:06 nanard Exp $
     1$Id: Changelog.txt,v 1.86 2009/07/29 08:44:29 nanard Exp $
    22miniUPnP client Changelog.
     3
     42009/07/29:
     5  fix in updateminiupnpcstrings.sh if OS name contains "/"
     6  Sending a correct value for MX: field in SSDP request
     7
     82009/07/20:
     9  Change the Makefile to compile under Mac OS X
     10  Fixed a stackoverflow in getDevicesFromMiniSSDPD()
    311
    4122009/07/09:
     
    8162009/06/04:
    917  patching to compile under CygWin and cross compile for minGW
     18
     19VERSION 1.3 :
    1020
    11212009/04/17:
  • trunk/third-party/miniupnp/README

    r8798 r8862  
    1 MiniUPnP is written by Thomas Bernard.
    2 Its homepage is http://miniupnp.free.fr/
    3 This is from miniupnpc-20090713.tar.gz
     1Project: miniupnp
     2Project web page: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
     3Author: Thomas Bernard
     4Copyright (c) 2005-2008 Thomas Bernard
     5This software is subject to the conditions detailed in the
     6LICENCE file provided within this distribution.
     7
     8For the comfort of Win32 users, bsdqueue.h is included in the distribution.
     9Its licence is included in the header of the file.
     10bsdqueue.h is a copy of the sys/queue.h of an OpenBSD system.
     11
     12* miniupnp Client *
     13
     14To compile, simply run 'gmake' (could be 'make').
     15Under win32, to compile with MinGW, type "mingw32make.bat".
     16The compilation is known to work under linux, FreeBSD,
     17OpenBSD, MacOS X and cygwin.
     18To install the library and headers on the system use :
     19> su
     20> make install
     21> exit
     22
     23alternatively, to install in a specific location, use :
     24> INSTALLPREFIX=/usr/local make install
     25
     26upnpc.c is a sample client using the libminiupnpc.
     27To use the libminiupnpc in your application, link it with
     28libminiupnpc.a and use the following functions found in miniupnpc.h,
     29upnpcommands.h and miniwget.h :
     30- upnpDiscover()
     31- miniwget()
     32- parserootdesc()
     33- GetUPNPUrls()
     34- UPNP_* (calling UPNP methods)
     35
     36Note : use #include <miniupnpc/miniupnpc.h> etc... for the includes
     37and -lminiupnpc for the link
     38
     39Discovery process is speeded up when MiniSSDPd is running on the machine.
     40
     41* Python module *
     42
     43you can build a python module with 'make pythonmodule'
     44and install it with 'make installpythonmodule'.
     45setup.py (and setupmingw32.py) are included in the distribution.
     46
     47
     48Feel free to contact me if you have any problem :
     49e-mail : miniupnp@free.fr
     50
     51If you are using libminiupnpc in your application, please
     52send me an email !
     53
     54
  • trunk/third-party/miniupnp/minissdpc.c

    r7837 r8862  
    1 /* $Id: minissdpc.c,v 1.7 2008/12/18 17:45:48 nanard Exp $ */
     1/* $Id: minissdpc.c,v 1.9 2009/07/20 09:18:05 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas BERNARD
    4  * copyright (c) 2005-2008 Thomas Bernard
     4 * copyright (c) 2005-2009 Thomas Bernard
    55 * This software is subjet to the conditions detailed in the
    66 * provided LICENCE file. */
     
    1313#ifdef WIN32
    1414#include <winsock2.h>
    15 #include <Ws2tcpip.h>
     15#include <ws2tcpip.h>
    1616#include <io.h>
     17/* Hack */
     18#define UNIX_PATH_LEN   108
     19struct sockaddr_un {
     20  uint16_t sun_family;
     21  char     sun_path[UNIX_PATH_LEN];
     22};
    1723#else
    1824#include <sys/socket.h>
     
    5864        p = buffer + 1;
    5965        l = stsize;     CODELENGTH(l, p);
     66        if(p + stsize > buffer + sizeof(buffer))
     67        {
     68                /* devtype is too long ! */
     69                close(s);
     70                return NULL;
     71        }
    6072        memcpy(p, devtype, stsize);
    6173        p += stsize;
  • trunk/third-party/miniupnp/miniupnpc.c

    r8798 r8862  
    1 /* $Id: miniupnpc.c,v 1.58 2009/07/09 15:59:46 nanard Exp $ */
     1/* $Id: miniupnpc.c,v 1.59 2009/07/29 08:44:29 nanard Exp $ */
    22/* Project : miniupnp
    33 * Author : Thomas BERNARD
     
    352352        "ST: %s\r\n"
    353353        "MAN: \"ssdp:discover\"\r\n"
    354         "MX: 3\r\n"
     354        "MX: %u\r\n"
    355355        "\r\n";
    356356        static const char * const deviceList[] = {
     
    366366        int n;
    367367        struct sockaddr_in sockudp_r, sockudp_w;
     368        unsigned int mx;
    368369
    369370#ifndef WIN32
     
    433434    }
    434435
     436        /* Calculating maximum response time in seconds */
     437        mx = ((unsigned int)delay) / 1000u;
    435438        /* receiving SSDP response packet */
    436439        for(n = 0;;)
     
    440443                /* sending the SSDP M-SEARCH packet */
    441444                n = snprintf(bufr, sizeof(bufr),
    442                              MSearchMsgFmt, deviceList[deviceIndex++]);
     445                             MSearchMsgFmt, deviceList[deviceIndex++], mx);
    443446                /*printf("Sending %s", bufr);*/
    444447                n = sendto(sudp, bufr, n, 0,
     
    627630}
    628631
    629 static int
     632int
    630633UPNPIGD_IsConnected(struct UPNPUrls * urls, struct IGDdatas * data)
    631634{
  • trunk/third-party/miniupnp/miniwget.c

    r8798 r8862  
    3232
    3333#include "miniupnpcstrings.h"
    34 #include "miniwget.h"
    3534
    3635/* miniwget2() :
  • trunk/third-party/miniupnp/minixml.c

    r8798 r8862  
    3636 * return 0 (false) in case of success and -1 (true) if the end
    3737 * of the xmlbuffer is reached. */
    38 static int parseatt(struct xmlparser * p)
     38int parseatt(struct xmlparser * p)
    3939{
    4040        const char * attname;
     
    107107/* parseelt parse the xml stream and
    108108 * call the callback functions when needed... */
    109 static void parseelt(struct xmlparser * p)
     109void parseelt(struct xmlparser * p)
    110110{
    111111        int i;
  • trunk/third-party/miniupnp/updateminiupnpcstrings.sh

    r8859 r8862  
    11#! /bin/sh
    2 # $Id: updateminiupnpcstrings.sh,v 1.3 2009/07/09 16:13:31 nanard Exp $
     2# $Id: updateminiupnpcstrings.sh,v 1.4 2009/07/29 08:34:01 nanard Exp $
    33
    4 TEMPLATE_FILE=$1
    5 OUTPUT_FILE=$2
     4FILE=miniupnpcstrings.h
     5TEMPLATE_FILE=${FILE}.in
    66
    77# detecting the OS name and version
     
    3131EXPR="s|OS_STRING \".*\"|OS_STRING \"${OS_NAME}/${OS_VERSION}\"|"
    3232#echo $EXPR
    33 #echo "Backing up $OUTPUT_FILE to $OUTPUT_FILE.bak."
    34 #cp $OUTPUT_FILE $OUTPUT_FILE.bak
    35 test -f ${TEMPLATE_FILE}
    36 echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $OUTPUT_FILE."
    37 sed "$EXPR" <"$TEMPLATE_FILE" >"$OUTPUT_FILE"
     33#echo "Backuping $FILE to $FILE.bak."
     34#cp $FILE $FILE.bak
     35test -f ${FILE}.in
     36echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $FILE."
     37sed -e "$EXPR" < $TEMPLATE_FILE > $FILE
    3838
Note: See TracChangeset for help on using the changeset viewer.