mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
(trunk libT) when processing errors in peer-io.c's event_read_cb() and tr_peerIoTryRead() functions, don't call tr_net_strerror() unless logging is turned on s.t. the string will be used.
This commit is contained in:
parent
3ba9796f4b
commit
b8d1bb3f6e
1 changed files with 4 additions and 4 deletions
|
@ -243,8 +243,8 @@ event_read_cb( int fd, short event UNUSED, void * vio )
|
|||
what |= BEV_EVENT_ERROR;
|
||||
}
|
||||
|
||||
tr_net_strerror( errstr, sizeof( errstr ), e );
|
||||
dbgmsg( io, "event_read_cb got an error. res is %d, what is %hd, errno is %d (%s)", res, what, e, errstr );
|
||||
dbgmsg( io, "event_read_cb got an error. res is %d, what is %hd, errno is %d (%s)",
|
||||
res, what, e, tr_net_strerror( errstr, sizeof( errstr ), e ) );
|
||||
|
||||
if( io->gotError != NULL )
|
||||
io->gotError( io, what, io->userData );
|
||||
|
@ -1166,8 +1166,8 @@ tr_peerIoTryRead( tr_peerIo * io, size_t howmuch )
|
|||
short what = BEV_EVENT_READING | BEV_EVENT_ERROR;
|
||||
if( res == 0 )
|
||||
what |= BEV_EVENT_EOF;
|
||||
tr_net_strerror( errstr, sizeof( errstr ), e );
|
||||
dbgmsg( io, "tr_peerIoTryRead got an error. res is %d, what is %hd, errno is %d (%s)", res, what, e, errstr );
|
||||
dbgmsg( io, "tr_peerIoTryRead got an error. res is %d, what is %hd, errno is %d (%s)",
|
||||
res, what, e, tr_net_strerror( errstr, sizeof( errstr ), e ) );
|
||||
io->gotError( io, what, io->userData );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue