Changeset 14026


Ignore:
Timestamp:
Feb 18, 2013, 12:36:20 AM (9 years ago)
Author:
jordan
Message:

(libT) #5293 'Wrong error codes used in upnp.c': second patch from rb07 to handle older versions of miniupnpc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/upnp.c

    r14020 r14026  
    9292{
    9393    struct UPNPDev * ret = NULL;
     94
     95#if defined (HAVE_MINIUPNP_16)
    9496    int err = UPNPDISCOVER_SUCCESS;
    95 
    96 #if defined (HAVE_MINIUPNP_16)
    9797    ret = upnpDiscover (msec, NULL, NULL, 0, 0, &err);
     98    if (err != UPNPDISCOVER_SUCCESS)
    9899#elif defined (HAVE_MINIUPNP_15)
    99100    ret = upnpDiscover (msec, NULL, NULL, 0);
    100 #else
    101     ret = UPNPDISCOVER_UNKNOWN_ERROR;
    102 #endif
    103 
    104     if (err != UPNPDISCOVER_SUCCESS)
     101    if (ret == NULL)
     102#endif
     103
    105104        tr_logAddNamedDbg (getKey (), "upnpDiscover failed (errno %d - %s)", errno, tr_strerror (errno));
    106105
Note: See TracChangeset for help on using the changeset viewer.