From 3ba9796f4b5ee58004485790abbc51134d4910b5 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 5 Apr 2011 16:34:49 +0000 Subject: [PATCH] (trunk libT) when processing an error in tr_peerIoTryWrite(), don't call tr_net_strerror() unless logging is turned on s.t. the string will be used. --- libtransmission/peer-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/peer-io.c b/libtransmission/peer-io.c index e05deafe1..43e579955 100644 --- a/libtransmission/peer-io.c +++ b/libtransmission/peer-io.c @@ -1210,8 +1210,8 @@ tr_peerIoTryWrite( tr_peerIo * io, size_t howmuch ) char errstr[512]; const short what = BEV_EVENT_WRITING | BEV_EVENT_ERROR; - tr_net_strerror( errstr, sizeof( errstr ), e ); - dbgmsg( io, "tr_peerIoTryWrite got an error. res is %d, what is %hd, errno is %d (%s)", n, what, e, errstr ); + dbgmsg( io, "tr_peerIoTryWrite got an error. res is %d, what is %hd, errno is %d (%s)", + n, what, e, tr_net_strerror( errstr, sizeof( errstr ), e ) ); if( io->gotError != NULL ) io->gotError( io, what, io->userData );