Changeset 13331
- Timestamp:
- May 30, 2012, 6:15:33 PM (9 years ago)
- Location:
- trunk/third-party/miniupnp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/third-party/miniupnp/Changelog.txt
r13289 r13331 1 $Id: Changelog.txt,v 1.16 6 2012/04/09 12:49:26nanard Exp $1 $Id: Changelog.txt,v 1.169 2012/05/24 18:08:49 nanard Exp $ 2 2 miniUPnP client Changelog. 3 4 VERSION 1.7 : released 2012/05/24 5 6 2012/05/01: 7 Cleanup settings of CFLAGS in Makefile 8 Fix signed/unsigned integer comparaisons 9 10 2012/04/20: 11 Allow to specify protocol with TCP or UDP for -A option 3 12 4 13 2012/04/09: -
trunk/third-party/miniupnp/README
r13258 r13331 1 1 Project: miniupnp 2 2 Project web page: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ 3 github: https://github.com/miniupnp/miniupnp 4 freecode: http://freecode.com/projects/miniupnp 3 5 Author: Thomas Bernard 4 Copyright (c) 2005-201 1Thomas Bernard6 Copyright (c) 2005-2012 Thomas Bernard 5 7 This software is subject to the conditions detailed in the 6 8 LICENSE file provided within this distribution. 9 7 10 8 11 For the comfort of Win32 users, bsdqueue.h is included in the distribution. … … 10 13 bsdqueue.h is a copy of the sys/queue.h of an OpenBSD system. 11 14 12 * miniupnp Client * 15 16 * miniUPnP Client - miniUPnPc * 13 17 14 18 To compile, simply run 'gmake' (could be 'make' on your system). 15 19 Under win32, to compile with MinGW, type "mingw32make.bat". 20 MS Visual C solution and project files are supplied in the msvc/ subdirectory. 21 16 22 The compilation is known to work under linux, FreeBSD, 17 23 OpenBSD, MacOS X, AmigaOS and cygwin. … … 24 30 > exit 25 31 26 alternatively, to install in a specific location, use :32 alternatively, to install into a specific location, use : 27 33 > INSTALLPREFIX=/usr/local make install 28 34 … … 42 48 Discovery process is speeded up when MiniSSDPd is running on the machine. 43 49 50 44 51 * Python module * 45 52 -
trunk/third-party/miniupnp/VERSION
r12593 r13331 1 1. 61 1.7 -
trunk/third-party/miniupnp/miniupnpc.c
r13289 r13331 1 /* $Id: miniupnpc.c,v 1.10 4 2012/04/09 12:40:11nanard Exp $ */1 /* $Id: miniupnpc.c,v 1.105 2012/04/11 05:50:53 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Web : http://miniupnp.free.fr/ … … 18 18 #endif 19 19 20 #if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) 20 #if !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) 21 21 #define HAS_IP_MREQN 22 22 #endif -
trunk/third-party/miniupnp/miniupnpc.h
r13289 r13331 19 19 20 20 /* versions : */ 21 #define MINIUPNPC_VERSION "1. 6.20120410"21 #define MINIUPNPC_VERSION "1.7" 22 22 #define MINIUPNPC_API_VERSION 8 23 23 -
trunk/third-party/miniupnp/miniwget.c
r13258 r13331 1 /* $Id: miniwget.c,v 1.5 5 2012/03/05 19:42:47nanard Exp $ */1 /* $Id: miniwget.c,v 1.56 2012/05/01 16:16:08 nanard Exp $ */ 2 2 /* Project : miniupnp 3 3 * Website : http://miniupnp.free.fr/ … … 70 70 /* buffers : */ 71 71 char * header_buf; 72 int header_buf_len = 2048;73 int header_buf_used = 0;72 unsigned int header_buf_len = 2048; 73 unsigned int header_buf_used = 0; 74 74 char * content_buf; 75 int content_buf_len = 2048;76 int content_buf_used = 0;75 unsigned int content_buf_len = 2048; 76 unsigned int content_buf_used = 0; 77 77 char chunksize_buf[32]; 78 int chunksize_buf_index;78 unsigned int chunksize_buf_index; 79 79 80 80 header_buf = malloc(header_buf_len); … … 100 100 * recognize also LF LF */ 101 101 i = 0; 102 while(i < ( header_buf_used-1) && (endofheaders == 0)) {102 while(i < ((int)header_buf_used-1) && (endofheaders == 0)) { 103 103 if(header_buf[i] == '\r') { 104 104 i++; 105 105 if(header_buf[i] == '\n') { 106 106 i++; 107 if(i < header_buf_used && header_buf[i] == '\r') {107 if(i < (int)header_buf_used && header_buf[i] == '\r') { 108 108 i++; 109 if(i < header_buf_used && header_buf[i] == '\n') {109 if(i < (int)header_buf_used && header_buf[i] == '\n') { 110 110 endofheaders = i+1; 111 111 } … … 197 197 if(i<n && buf[i] == '\r') i++; 198 198 if(i<n && buf[i] == '\n') { 199 int j;199 unsigned int j; 200 200 for(j = 0; j < chunksize_buf_index; j++) { 201 201 if(chunksize_buf[j] >= '0' … … 224 224 } 225 225 } 226 bytestocopy = ((int)chunksize < n - i)?chunksize:(n - i);227 if(( int)(content_buf_used + bytestocopy) > content_buf_len)226 bytestocopy = ((int)chunksize < (n - i))?chunksize:(unsigned int)(n - i); 227 if((content_buf_used + bytestocopy) > content_buf_len) 228 228 { 229 if(content_length >= content_buf_used + (int)bytestocopy) {229 if(content_length >= (int)(content_buf_used + bytestocopy)) { 230 230 content_buf_len = content_length; 231 231 } else { 232 content_buf_len = content_buf_used + (int)bytestocopy;232 content_buf_len = content_buf_used + bytestocopy; 233 233 } 234 234 content_buf = (char *)realloc((void *)content_buf, … … 245 245 /* not chunked */ 246 246 if(content_length > 0 247 && ( content_buf_used + n) > content_length) {247 && (int)(content_buf_used + n) > content_length) { 248 248 /* skipping additional bytes */ 249 249 n = content_length - content_buf_used; … … 251 251 if(content_buf_used + n > content_buf_len) 252 252 { 253 if(content_length >= content_buf_used + n) {253 if(content_length >= (int)(content_buf_used + n)) { 254 254 content_buf_len = content_length; 255 255 } else { … … 264 264 } 265 265 /* use the Content-Length header value if available */ 266 if(content_length > 0 && content_buf_used >= content_length)266 if(content_length > 0 && (int)content_buf_used >= content_length) 267 267 { 268 268 #ifdef DEBUG … … 287 287 * Return NULL if something failed. */ 288 288 static void * 289 miniwget3(const char * url, const char *host,289 miniwget3(const char * host, 290 290 unsigned short port, const char * path, 291 291 int * size, char * addr_str, int addr_str_len, … … 391 391 * Call miniwget3(); retry with HTTP/1.1 if 1.0 fails. */ 392 392 static void * 393 miniwget2(const char * url, const char *host,393 miniwget2(const char * host, 394 394 unsigned short port, const char * path, 395 395 int * size, char * addr_str, int addr_str_len) … … 397 397 char * respbuffer; 398 398 399 respbuffer = miniwget3( url,host, port, path, size, addr_str, addr_str_len, "1.1");399 respbuffer = miniwget3(host, port, path, size, addr_str, addr_str_len, "1.1"); 400 400 /* 401 respbuffer = miniwget3( url,host, port, path, size, addr_str, addr_str_len, "1.0");401 respbuffer = miniwget3(host, port, path, size, addr_str, addr_str_len, "1.0"); 402 402 if (*size == 0) 403 403 { … … 406 406 #endif 407 407 free(respbuffer); 408 respbuffer = miniwget3( url,host, port, path, size, addr_str, addr_str_len, "1.1");408 respbuffer = miniwget3(host, port, path, size, addr_str, addr_str_len, "1.1"); 409 409 } 410 410 */ … … 503 503 printf("parsed url : hostname='%s' port=%hu path='%s'\n", hostname, port, path); 504 504 #endif 505 return miniwget2( url,hostname, port, path, size, 0, 0);505 return miniwget2(hostname, port, path, size, 0, 0); 506 506 } 507 507 … … 520 520 printf("parsed url : hostname='%s' port=%hu path='%s'\n", hostname, port, path); 521 521 #endif 522 return miniwget2( url,hostname, port, path, size, addr, addrlen);522 return miniwget2(hostname, port, path, size, addr, addrlen); 523 523 } 524 524 -
trunk/third-party/miniupnp/updateminiupnpcstrings.sh
r11381 r13331 1 1 #! /bin/sh 2 # $Id: updateminiupnpcstrings.sh,v 1.4 2009/07/29 08:34:01 nanard Exp $ 2 # $Id: updateminiupnpcstrings.sh,v 1.7 2011/01/04 11:41:53 nanard Exp $ 3 # project miniupnp : http://miniupnp.free.fr/ 4 #Â (c) 2009 Thomas Bernard 3 5 4 TEMPLATE_FILE=$1 5 OUTPUT_FILE=$2 6 FILE=miniupnpcstrings.h 7 TMPFILE=miniupnpcstrings.h.tmp 8 TEMPLATE_FILE=${FILE}.in 6 9 7 10 # detecting the OS name and version … … 13 16 fi 14 17 # use lsb_release (Linux Standard Base) when available 15 if os_name=`lsb_release -i -s 2>/dev/null`; then 16 OS_NAME=$os_name 17 OS_VERSION=`lsb_release -r -s` 18 LSB_RELEASE=`which lsb_release` 19 if [ 0 -eq $? -a -x "${LSB_RELEASE}" ]; then 20 OS_NAME=`${LSB_RELEASE} -i -s` 21 OS_VERSION=`${LSB_RELEASE} -r -s` 22 case $OS_NAME in 23 Debian) 24 #OS_VERSION=`${LSB_RELEASE} -c -s` 25 ;; 26 Ubuntu) 27 #OS_VERSION=`${LSB_RELEASE} -c -s` 28 ;; 29 esac 30 fi 31 32 # on AmigaOS 3, uname -r returns "unknown", so we use uname -v 33 if [ "$OS_NAME" = "AmigaOS" ]; then 34 if [ "$OS_VERSION" = "unknown" ]; then 35 OS_VERSION=`uname -v` 36 fi 18 37 fi 19 38 20 39 echo "Detected OS [$OS_NAME] version [$OS_VERSION]" 40 MINIUPNPC_VERSION=`cat VERSION` 41 echo "MiniUPnPc version [${MINIUPNPC_VERSION}]" 21 42 22 43 EXPR="s|OS_STRING \".*\"|OS_STRING \"${OS_NAME}/${OS_VERSION}\"|" 23 44 #echo $EXPR 24 #echo "Backing up $OUTPUT_FILE to $OUTPUT_FILE.bak." 25 #cp $OUTPUT_FILE $OUTPUT_FILE.bak 26 test -f ${TEMPLATE_FILE} 27 echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $OUTPUT_FILE." 28 sed -e "$EXPR" < $TEMPLATE_FILE > $OUTPUT_FILE 45 test -f ${FILE}.in 46 echo "setting OS_STRING macro value to ${OS_NAME}/${OS_VERSION} in $FILE." 47 sed -e "$EXPR" < $TEMPLATE_FILE > $TMPFILE 29 48 49 EXPR="s|MINIUPNPC_VERSION_STRING \".*\"|MINIUPNPC_VERSION_STRING \"${MINIUPNPC_VERSION}\"|" 50 echo "setting MINIUPNPC_VERSION_STRING macro value to ${MINIUPNPC_VERSION} in $FILE." 51 sed -e "$EXPR" < $TMPFILE > $FILE 52 rm $TMPFILE 53
Note: See TracChangeset
for help on using the changeset viewer.