From b0c66c01e2a8cfc781f14abc711d418ff6d6667b Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 9 Dec 2013 09:24:28 +0100 Subject: [PATCH] miniupnpc: define MAXHOSTNAMELEN if not already done --- miniupnpc/Changelog.txt | 3 +++ miniupnpc/connecthostport.c | 8 ++++++-- miniupnpc/miniupnpc.c | 8 ++++++-- miniupnpc/miniwget.c | 8 ++++++-- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/miniupnpc/Changelog.txt b/miniupnpc/Changelog.txt index 4dc1aa9..50b8221 100644 --- a/miniupnpc/Changelog.txt +++ b/miniupnpc/Changelog.txt @@ -1,6 +1,9 @@ $Id: Changelog.txt,v 1.187 2013/06/06 21:36:39 nanard Exp $ miniUPnP client Changelog. +2013/08/01: + define MAXHOSTNAMELEN if not already done + 2013/06/06: update upnpreplyparse to allow larger values (128 chars instead of 64) diff --git a/miniupnpc/connecthostport.c b/miniupnpc/connecthostport.c index 98a00c4..aabc7a6 100644 --- a/miniupnpc/connecthostport.c +++ b/miniupnpc/connecthostport.c @@ -1,7 +1,7 @@ -/* $Id: connecthostport.c,v 1.9 2012/06/26 00:00:27 nanard Exp $ */ +/* $Id: connecthostport.c,v 1.11 2013/08/01 21:21:25 nanard Exp $ */ /* Project : miniupnp * Author : Thomas Bernard - * Copyright (c) 2010-2012 Thomas Bernard + * Copyright (c) 2010-2013 Thomas Bernard * This software is subject to the conditions detailed in the * LICENCE file provided in this distribution. */ @@ -51,6 +51,10 @@ #include "connecthostport.h" +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + /* connecthostport() * return a socket connected (TCP) to the host and port * or -1 in case of error */ diff --git a/miniupnpc/miniupnpc.c b/miniupnpc/miniupnpc.c index 95504b1..5405e23 100644 --- a/miniupnpc/miniupnpc.c +++ b/miniupnpc/miniupnpc.c @@ -1,8 +1,8 @@ -/* $Id: miniupnpc.c,v 1.111 2012/10/09 17:53:14 nanard Exp $ */ +/* $Id: miniupnpc.c,v 1.113 2013/10/07 10:04:56 nanard Exp $ */ /* Project : miniupnp * Web : http://miniupnp.free.fr/ * Author : Thomas BERNARD - * copyright (c) 2005-2012 Thomas Bernard + * copyright (c) 2005-2013 Thomas Bernard * This software is subjet to the conditions detailed in the * provided LICENSE file. */ #define __EXTENSIONS__ 1 @@ -97,6 +97,10 @@ struct ip_mreqn #define PRINT_SOCKET_ERROR(x) perror(x) #endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + #define SOAPPREFIX "s" #define SERVICEPREFIX "u" #define SERVICEPREFIX2 'u' diff --git a/miniupnpc/miniwget.c b/miniupnpc/miniwget.c index 31f3af0..a420d57 100644 --- a/miniupnpc/miniwget.c +++ b/miniupnpc/miniwget.c @@ -1,8 +1,8 @@ -/* $Id: miniwget.c,v 1.58 2012/08/11 05:52:49 nanard Exp $ */ +/* $Id: miniwget.c,v 1.60 2013/10/07 10:03:16 nanard Exp $ */ /* Project : miniupnp * Website : http://miniupnp.free.fr/ * Author : Thomas Bernard - * Copyright (c) 2005-2012 Thomas Bernard + * Copyright (c) 2005-2013 Thomas Bernard * This software is subject to the conditions detailed in the * LICENCE file provided in this distribution. */ @@ -52,6 +52,10 @@ #include "connecthostport.h" #include "receivedata.h" +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + /* * Read a HTTP response from a socket. * Process Content-Length and Transfer-encoding headers.