From 55d581481f901bce22ce014e0ec5b74a5ed325e6 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 16 Sep 2010 06:17:38 +0200 Subject: [PATCH] Broken IPv6. IPv6 is currently broken in latest release of branch-1.6.x, so find a patch attached that correct the issue (small fixes on define, undef and retVal). --- ChangeLog | 7 +++++++ upnp/inc/upnp.h | 6 +++--- upnp/src/api/upnpapi.c | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b5cdae6..7b0d9cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ Version 1.6.7 ******************************************************************************* +2010-09-16 Fabrice Fontaine + + Broken IPv6. + IPv6 is currently broken in latest release of branch-1.6.x, so find a + patch attached that correct the issue (small fixes on define, undef and + retVal). + 2010-09-10 Warwick Harvey Patch to take notice of UPNP_USE_RWLOCK flag diff --git a/upnp/inc/upnp.h b/upnp/inc/upnp.h index bd8cd7f..3325961 100644 --- a/upnp/inc/upnp.h +++ b/upnp/inc/upnp.h @@ -987,7 +987,7 @@ EXPORT_SPEC int UpnpInit( * \li \c UPNP_E_INVALID_INTERFACE: IfName is invalid or does not * have a valid IPv4 or IPv6 addresss configured. */ -#ifdef ENABLE_IPV6 +#ifdef UPNP_ENABLE_IPV6 EXPORT_SPEC int UpnpInit2( /*! The interface name to use by the UPnP SDK operations. * Examples: "eth0", "xl0", "Local Area Connection", \c NULL to @@ -1046,7 +1046,7 @@ EXPORT_SPEC unsigned short UpnpGetServerPort(void); * related requests. * \li On error: 0 is returned if \b UpnpInit has not succeeded. */ -#ifdef ENABLE_IPV6 +#ifdef UPNP_ENABLE_IPV6 EXPORT_SPEC unsigned short UpnpGetServerPort6(void); #endif /*! @@ -1074,7 +1074,7 @@ EXPORT_SPEC char *UpnpGetServerIpAddress(void); * listening for UPnP related requests. * \li On error: \c NULL is returned if \b UpnpInit has not succeeded. */ -#ifdef ENABLE_IPV6 +#ifdef UPNP_ENABLE_IPV6 EXPORT_SPEC char *UpnpGetServerIp6Address(void); EXPORT_SPEC char *UpnpGetServerUlaGuaIp6Address(void); diff --git a/upnp/src/api/upnpapi.c b/upnp/src/api/upnpapi.c index aff3c59..9463aca 100644 --- a/upnp/src/api/upnpapi.c +++ b/upnp/src/api/upnpapi.c @@ -488,7 +488,7 @@ exit_function: return retVal; } -#ifndef UPNP_ENABLE_IPV6 +#ifdef UPNP_ENABLE_IPV6 int UpnpInit2(const char *IfName, unsigned short DestPort) { int retVal; @@ -533,7 +533,7 @@ int UpnpInit2(const char *IfName, unsigned short DestPort) exit_function: ithread_mutex_unlock(&gSDKInitMutex); - return UPNP_E_SUCCESS; + return retVal; } #endif