1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

silence a couple of annoying dbg messages

This commit is contained in:
Charles Kerr 2008-04-14 20:06:37 +00:00
parent 59817732ab
commit 7f89ee3db2
2 changed files with 9 additions and 8 deletions

View file

@ -1067,7 +1067,7 @@ tr_bencSaveAsSerializedPHP( const tr_benc * top, int * len )
int
tr_bencSaveFile( const char * filename, const tr_benc * b )
{
int ret = TR_OK;
int err = TR_OK;
int len;
char * content = tr_bencSave( b, &len );
FILE * out = NULL;
@ -1077,20 +1077,21 @@ tr_bencSaveFile( const char * filename, const tr_benc * b )
{
tr_err( _( "Couldn't open \"%1$s\": %2$s" ),
filename, tr_strerror( errno ) );
ret = TR_EINVALID;
err = TR_EINVALID;
}
else if( fwrite( content, sizeof( char ), len, out ) != (size_t)len )
{
tr_err( _( "Couldn't save file \"%1$s\": %2$s" ),
filename, tr_strerror( errno ) );
ret = TR_EINVALID;
err = TR_EINVALID;
}
tr_dbg( "tr_bencSaveFile returned %d when saving \"%s\"", ret, filename );
if( !err )
tr_dbg( "tr_bencSaveFile saved \"%s\"", filename );
tr_free( content );
if( out )
fclose( out );
return ret;
return err;
}
int

View file

@ -64,9 +64,9 @@ struct tr_natpmp
static void
logVal( const char * func, int ret )
{
if( ret==NATPMP_TRYAGAIN )
tr_ndbg( getKey(), "%s responded \"try again\"", func );
else if( ret >= 0 )
if( ret == NATPMP_TRYAGAIN )
return;
if( ret >= 0 )
tr_ninf( getKey(), _( "%s succeeded (%d)" ), func, ret );
else
tr_ndbg( getKey(), "%s failed (%d): %s (%d)", func, ret, tr_strerror(errno), errno );