Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 408277 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/utils/net/upnp_stubs.c (-2 / +19 lines)
Lines 639-645 Link Here
639
    {
639
    {
640
        struct UPNPDev * devlist;
640
        struct UPNPDev * devlist;
641
        errno = 0;
641
        errno = 0;
642
#ifndef UPNPDISCOVER_SUCCESS
643
        /* miniupnpc 1.5 */
642
        devlist = upnpDiscover( 2000, NULL, NULL, 0 );
644
        devlist = upnpDiscover( 2000, NULL, NULL, 0 );
645
#else
646
        /* miniupnpc 1.6 */
647
        int error = 0;
648
        devlist = upnpDiscover( 2000, NULL, NULL, 0, 0, &error);
649
#endif
643
        if( devlist == NULL )
650
        if( devlist == NULL )
644
        {
651
        {
645
            dbg_printf( "upnpDiscover failed (errno %d - %s)\n", errno,  str_errno( errno ) );
652
            dbg_printf( "upnpDiscover failed (errno %d - %s)\n", errno,  str_errno( errno ) );
Lines 680-686 Link Here
680
        snprintf( type, sizeof( type ), "%s", ( map->isTcp ? "TCP" : "UDP" ) );
687
        snprintf( type, sizeof( type ), "%s", ( map->isTcp ? "TCP" : "UDP" ) );
681
        i = UPNP_GetSpecificPortMappingEntry( map->upnpUrls.controlURL,
688
        i = UPNP_GetSpecificPortMappingEntry( map->upnpUrls.controlURL,
682
                                              map->upnpData.first.servicetype, portStr,
689
                                              map->upnpData.first.servicetype, portStr,
683
                                              type, intClient, intPort );
690
                                              type, intClient, intPort
691
#ifdef UPNPDISCOVER_SUCCESS
692
                                              /* miniupnpc 1.6 */
693
                                              , NULL, NULL, NULL
694
#endif
695
                                            );
684
        if( i != UPNPCOMMAND_SUCCESS )
696
        if( i != UPNPCOMMAND_SUCCESS )
685
        {
697
        {
686
            dbg_printf( "Port %d isn't forwarded\n", map->extPort );
698
            dbg_printf( "Port %d isn't forwarded\n", map->extPort );
Lines 730-736 Link Here
730
            err = UPNP_AddPortMapping( map->upnpUrls.controlURL,
742
            err = UPNP_AddPortMapping( map->upnpUrls.controlURL,
731
                                       map->upnpData.first.servicetype,
743
                                       map->upnpData.first.servicetype,
732
                                       extPortStr, intPortStr, map->lanaddr,
744
                                       extPortStr, intPortStr, map->lanaddr,
733
                                       desc, type, NULL );
745
                                       desc, type, NULL
746
#ifdef UPNPDISCOVER_SUCCESS
747
                                       /* miniupnpc 1.6 */
748
                                       , NULL
749
#endif
750
                                     );
734
            map->upnpMapped = !err;
751
            map->upnpMapped = !err;
735
        }
752
        }
736
        dbg_printf( "Port forwarding through \"%s\", service \"%s\". (local address[%s:%d])\n", map->upnpUrls.controlURL, map->upnpData.first.servicetype, map->lanaddr, map->intPort );
753
        dbg_printf( "Port forwarding through \"%s\", service \"%s\". (local address[%s:%d])\n", map->upnpUrls.controlURL, map->upnpData.first.servicetype, map->lanaddr, map->intPort );

Return to bug 408277