(trunk libT) #4101 "RPC method blocklist-update is broken" -- add debugging error messages for cases where gzopen/gzread fails
This commit is contained in:
parent
334aa46d60
commit
f6d68844bd
|
@ -1126,6 +1126,8 @@ gotNewBlocklist( tr_session * session,
|
|||
char result[1024];
|
||||
struct tr_rpc_idle_data * data = user_data;
|
||||
|
||||
*result = '\0';
|
||||
|
||||
if( response_code != 200 )
|
||||
{
|
||||
tr_snprintf( result, sizeof( result ), "gotNewBlocklist: http error %ld: %s",
|
||||
|
@ -1181,10 +1183,15 @@ gotNewBlocklist( tr_session * session,
|
|||
}
|
||||
tr_free( buf );
|
||||
gzclose( gzf );
|
||||
} else {
|
||||
tr_snprintf( result, sizeof( result ), _( "Error opening \"%1$s\": %2$s" ), filename, tr_strerror( errno ) );
|
||||
}
|
||||
tr_close_file( fd );
|
||||
}
|
||||
|
||||
if( *result )
|
||||
tr_err( "%s", result );
|
||||
|
||||
unlink( filename );
|
||||
tr_free( filename );
|
||||
filename = filename2;
|
||||
|
|
Loading…
Reference in New Issue