From f9d7ca3a09961ab90437be8219fa3b07da1059c7 Mon Sep 17 00:00:00 2001 From: spiralvoice Date: Sun, 24 Jun 2012 08:10:42 +0000 Subject: [PATCH] patch #7805 --- config/configure.in | 20 ++++++++++---------- distrib/ChangeLog | 1 + src/utils/net/upnp_stubs.c | 9 ++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/configure.in b/config/configure.in index 72f6b580..709d9f40 100644 --- a/config/configure.in +++ b/config/configure.in @@ -853,30 +853,30 @@ fi if test "$UPNP_NATPMP_FORCE" = "yes"; then UPNP_NATPMP=yes cd $PATCH_DIR - $WGET http://miniupnp.tuxfamily.org/files/miniupnpc-1.4.20100609.tar.gz - $WGET http://miniupnp.tuxfamily.org/files/libnatpmp-20100202.tar.gz + $WGET http://miniupnp.tuxfamily.org/files/miniupnpc-1.6.tar.gz + $WGET http://miniupnp.tuxfamily.org/files/libnatpmp-20110808.tar.gz mkdir -p $BUILD_DIR $LOCAL_DIR/usr/bin $LOCAL_DIR/usr/lib $LOCAL_DIR/usr/include/miniupnpc cd $BUILD_DIR - rm -rf libnatpmp-20100202 miniupnpc-1.4.20100609 - tar -xzf $PATCH_DIR/miniupnpc-1.4.20100609.tar.gz - tar -xzf $PATCH_DIR/libnatpmp-20100202.tar.gz - cd $BUILD_DIR/libnatpmp-20100202 + rm -rf libnatpmp-20110808 miniupnpc-1.6 + tar -xzf $PATCH_DIR/miniupnpc-1.6.tar.gz + tar -xzf $PATCH_DIR/libnatpmp-20110808.tar.gz + cd $BUILD_DIR/libnatpmp-20110808 make all install PREFIX=$LOCAL_DIR - cd $BUILD_DIR/miniupnpc-1.4.20100609 + cd $BUILD_DIR/miniupnpc-1.6 make all install PREFIX=$LOCAL_DIR cd $CONFIG_DIR - rm -rf $BUILD_DIR/libnatpmp-20100202 $BUILD_DIR/miniupnpc-1.4.20100609 + rm -rf $BUILD_DIR/libnatpmp-20110808 $BUILD_DIR/miniupnpc-1.6 CPPFLAGS="${CPPFLAGS} -I$LOCAL_DIR/usr/include" LDFLAGS="${LDFLAGS} -L$LOCAL_DIR/usr/lib" fi if test "$UPNP_NATPMP" = "yes"; then - echo "----- checking libminiupnpc >= 1.4.20100609 (optional)" + echo "----- checking libminiupnpc >= 1.6 (optional)" AC_CHECK_HEADERS(miniupnpc/miniupnpc.h,[AC_CHECK_LIB(miniupnpc,upnpDiscover,[UPNP_NATPMP=yes],[UPNP_NATPMP=no])],[UPNP_NATPMP=no]) fi if test "$UPNP_NATPMP" = "yes"; then - echo "----- checking libnatpmp >= 20100202 (optional)" + echo "----- checking libnatpmp >= 20110808 (optional)" AC_CHECK_HEADERS(natpmp.h,[AC_CHECK_LIB(natpmp,initnatpmp,[UPNP_NATPMP=yes],[UPNP_NATPMP=no])],[UPNP_NATPMP=no]) fi diff --git a/distrib/ChangeLog b/distrib/ChangeLog index 744e440b..a81d7b71 100644 --- a/distrib/ChangeLog +++ b/distrib/ChangeLog @@ -15,6 +15,7 @@ ChangeLog ========= 2012/06/24 +7805: Update upnp libraries 7804: new option filenames_utf8 (ygrek) 7803: pause conditions: "pause where priority < X" (ygrek) 7802: Do not leave empty files if code generation fails (ygrek) diff --git a/src/utils/net/upnp_stubs.c b/src/utils/net/upnp_stubs.c index ac3a37e1..4932e86e 100644 --- a/src/utils/net/upnp_stubs.c +++ b/src/utils/net/upnp_stubs.c @@ -501,7 +501,7 @@ natpmpPulse( ml_upnpmp_t * map ) if( map->enabled && ( map->natpmpState == ML_NATPMP_DISCOVER ) ) { - int val = initnatpmp( &map->natpmp ); + int val = initnatpmp( &map->natpmp, 0, 0 ); dbg_printf( "initnatpmp = %d\n", val ); val = sendpublicaddressrequest( &map->natpmp ); dbg_printf( "sendpublicaddressrequest = %d\n", val ); @@ -639,7 +639,7 @@ upnpPulse( ml_upnpmp_t * map ) { struct UPNPDev * devlist; errno = 0; - devlist = upnpDiscover( 2000, NULL, NULL, 0 ); + devlist = upnpDiscover( 2000, NULL, NULL, 0, 0, 0 ); if( devlist == NULL ) { dbg_printf( "upnpDiscover failed (errno %d - %s)\n", errno, str_errno( errno ) ); @@ -680,7 +680,7 @@ upnpPulse( ml_upnpmp_t * map ) snprintf( type, sizeof( type ), "%s", ( map->isTcp ? "TCP" : "UDP" ) ); i = UPNP_GetSpecificPortMappingEntry( map->upnpUrls.controlURL, map->upnpData.first.servicetype, portStr, - type, intClient, intPort ); + type, intClient, intPort, NULL, NULL, NULL ); if( i != UPNPCOMMAND_SUCCESS ) { dbg_printf( "Port %d isn't forwarded\n", map->extPort ); @@ -730,7 +730,7 @@ upnpPulse( ml_upnpmp_t * map ) err = UPNP_AddPortMapping( map->upnpUrls.controlURL, map->upnpData.first.servicetype, extPortStr, intPortStr, map->lanaddr, - desc, type, NULL ); + desc, type, NULL, "0" ); map->upnpMapped = !err; } dbg_printf( "Port forwarding through \"%s\", service \"%s\". (local address[%s:%d])\n", map->upnpUrls.controlURL, map->upnpData.first.servicetype, map->lanaddr, map->intPort ); @@ -901,7 +901,6 @@ upnp_thread_start( ) //pthread_cond_init(&cond, NULL); pthread_mutex_init(&g_mutex, NULL); pthread_mutex_init(&g_delay_mutex, NULL); - pthread_mutex_unlock(&g_mutex); err = pthread_create(&g_pthread, &attr, upnpNatpmpThread, NULL); -- 2.11.4.GIT