diff options
author | erdgeist <> | 2008-12-03 20:49:52 +0000 |
---|---|---|
committer | erdgeist <> | 2008-12-03 20:49:52 +0000 |
commit | 405ef01dd3b9d1fa0794c3b610c37181436a3ce2 (patch) | |
tree | 4034946aafec34f24c4f6d7999f0b5ebce469a4c | |
parent | 76da780220c498f81d57d4955cb82cfd32f0dbf4 (diff) |
printf is buffered, write not. Use printf for all.
-rw-r--r-- | trackerlogic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/trackerlogic.c b/trackerlogic.c index b418de4..ee8596c 100644 --- a/trackerlogic.c +++ b/trackerlogic.c | |||
@@ -113,9 +113,8 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer WANT_SYNC_PARAM( | |||
113 | uint8_t *_ip = (uint8_t*)peer_dest; | 113 | uint8_t *_ip = (uint8_t*)peer_dest; |
114 | int i; | 114 | int i; |
115 | for( i=0;i<20;++i)printf("%02X",(*hash)[i]); | 115 | for( i=0;i<20;++i)printf("%02X",(*hash)[i]); |
116 | printf( " %d.%d.%d.%d:%d\t%d %02X ", _ip[0], _ip[1], _ip[2], _ip[3], OT_PEERTIME( peer_dest ), OT_PEERTIME( peer_dest ), OT_FLAG(peer_dest)); | 116 | if( g_this_peerid_len ) g_this_peerid_data[g_this_peerid_len] = 0; |
117 | if( g_this_peerid_len ) write( 1, g_this_peerid_data, g_this_peerid_len ); | 117 | printf( " %d.%d.%d.%d:%d\t%d %02X %s\n", _ip[0], _ip[1], _ip[2], _ip[3], OT_PEERTIME( peer_dest ), OT_PEERTIME( peer_dest ), OT_FLAG(peer_dest), g_this_peerid_data ? g_this_peerid_data : "-" ); |
118 | putchar(10); | ||
119 | } | 118 | } |
120 | #endif | 119 | #endif |
121 | 120 | ||