Changeset 14020


Ignore:
Timestamp:
Feb 14, 2013, 11:45:13 PM (9 years ago)
Author:
jordan
Message:

(libT) #5293 'Wrong error codes used in upnp.c': patch by rb07

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/upnp.c

    r13868 r14020  
    9191tr_upnpDiscover (int msec)
    9292{
    93     int err = 0;
    9493    struct UPNPDev * ret = NULL;
     94    int err = UPNPDISCOVER_SUCCESS;
    9595
    9696#if defined (HAVE_MINIUPNP_16)
     
    9999    ret = upnpDiscover (msec, NULL, NULL, 0);
    100100#else
    101     ret = UPNPCOMMAND_UNKNOWN_ERROR;
    102 #endif
    103 
    104     if (ret != UPNPCOMMAND_SUCCESS)
    105         tr_logAddNamedDbg (getKey (), "upnpDiscover failed (errno %d - %s)", err, tr_strerror (err));
     101    ret = UPNPDISCOVER_UNKNOWN_ERROR;
     102#endif
     103
     104    if (err != UPNPDISCOVER_SUCCESS)
     105        tr_logAddNamedDbg (getKey (), "upnpDiscover failed (errno %d - %s)", errno, tr_strerror (errno));
    106106
    107107    return ret;
Note: See TracChangeset for help on using the changeset viewer.