mirror of
				git://erdgeist.org/opentracker
				synced 2025-11-04 11:53:22 +08:00 
			
		
		
		
	printf is buffered, write not. Use printf for all.
This commit is contained in:
		
							parent
							
								
									76da780220
								
							
						
					
					
						commit
						405ef01dd3
					
				@ -113,9 +113,8 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer  WANT_SYNC_PARAM(
 | 
				
			|||||||
      uint8_t *_ip = (uint8_t*)peer_dest;
 | 
					      uint8_t *_ip = (uint8_t*)peer_dest;
 | 
				
			||||||
      int i;
 | 
					      int i;
 | 
				
			||||||
      for( i=0;i<20;++i)printf("%02X",(*hash)[i]);
 | 
					      for( i=0;i<20;++i)printf("%02X",(*hash)[i]);
 | 
				
			||||||
      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));
 | 
					      if( g_this_peerid_len ) g_this_peerid_data[g_this_peerid_len] = 0;
 | 
				
			||||||
      if( g_this_peerid_len ) write( 1, g_this_peerid_data, g_this_peerid_len );
 | 
					      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 : "-" );
 | 
				
			||||||
      putchar(10);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user