mirror of
https://github.com/transmission/transmission
synced 2025-03-03 10:15:45 +00:00
better nat-pmp error logging. (this will very briefly break the mac build)
This commit is contained in:
parent
92c42168ee
commit
5739207640
2 changed files with 6 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include <arpa/inet.h> /* inet_ntoa */
|
#include <arpa/inet.h> /* inet_ntoa */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ENABLE_STRNATPMPERR
|
||||||
#include <libnatpmp/natpmp.h>
|
#include <libnatpmp/natpmp.h>
|
||||||
|
|
||||||
#include "transmission.h"
|
#include "transmission.h"
|
||||||
|
@ -69,7 +70,9 @@ logVal( const char * func, int ret )
|
||||||
if( ret >= 0 )
|
if( ret >= 0 )
|
||||||
tr_ninf( getKey(), _( "%s succeeded (%d)" ), func, ret );
|
tr_ninf( getKey(), _( "%s succeeded (%d)" ), func, ret );
|
||||||
else
|
else
|
||||||
tr_ndbg( getKey(), "%s failed (%d): %s (%d)", func, ret, tr_strerror(errno), errno );
|
tr_ndbg( getKey(), "%s failed. natpmp returned %d (%s); errno is %d (%s)",
|
||||||
|
func, ret, strnatpmperr(ret), errno, tr_strerror(errno) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct tr_natpmp*
|
struct tr_natpmp*
|
||||||
|
|
2
third-party/libnatpmp/Makefile.am
vendored
2
third-party/libnatpmp/Makefile.am
vendored
|
@ -1,5 +1,7 @@
|
||||||
noinst_LIBRARIES = libnatpmp.a
|
noinst_LIBRARIES = libnatpmp.a
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -DENABLE_STRNATPMPERR
|
||||||
|
|
||||||
libnatpmp_a_SOURCES = \
|
libnatpmp_a_SOURCES = \
|
||||||
getgateway.c \
|
getgateway.c \
|
||||||
natpmp.c
|
natpmp.c
|
||||||
|
|
Loading…
Reference in a new issue