Changeset 3606
- Timestamp:
- Oct 27, 2007, 9:29:41 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r3536 r3606 36 36 AC_SEARCH_LIBS([socket], [socket net]) 37 37 AC_SEARCH_LIBS([gethostbyname], [nsl bind]) 38 39 dnl ---------------------------------------------------------------------------- 40 dnl 41 dnl va_copy 42 43 AC_MSG_CHECKING([how to copy va_list]) 44 AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);], 45 AC_MSG_RESULT([va_copy]), 46 [ AH_TEMPLATE([va_copy], [define if va_copy is not available]) 47 AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);], 48 [ AC_DEFINE([va_copy], [__va_copy]) 49 AC_MSG_RESULT([__va_copy])], 50 [ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))]) 51 AC_MSG_RESULT([memcpy])] 52 ) 53 ]) 54 38 55 39 56 dnl ---------------------------------------------------------------------------- -
trunk/gtk/tr_torrent.c
r3484 r3606 178 178 maketorrent( tr_torrent * handle ) 179 179 { 180 TrTorrent * tor = g_object_new( TR_TORRENT_TYPE, NULL ); 180 181 tr_torrentDisablePex( handle, !pref_flag_get( PREF_KEY_PEX ) ); 181 TrTorrent * tor = g_object_new( TR_TORRENT_TYPE, NULL );182 182 tor->handle = handle; 183 183 return tor; -
trunk/libtransmission/handshake.c
r3508 r3606 969 969 && ( !tr_peerIoReconnect( handshake->io ) ) ) 970 970 { 971 int msgSize; 972 uint8_t * msg; 971 973 dbgmsg( handshake, "handshake failed, trying plaintext..." ); 972 int msgSize; 973 uint8_t * msg = buildHandshakeMessage( handshake, &msgSize ); 974 msg = buildHandshakeMessage( handshake, &msgSize ); 974 975 handshake->haveSentBitTorrentHandshake = 1; 975 976 setReadState( handshake, AWAITING_HANDSHAKE ); -
trunk/libtransmission/inout.c
r3570 r3606 428 428 { 429 429 struct recheck_node tmp; 430 struct recheck_node * node; 430 431 tmp.torrent = tor; 431 struct recheck_node *node = tr_list_remove( &recheckList,432 433 432 node = tr_list_remove( &recheckList, 433 &tmp, 434 compareRecheckByTorrent ); 434 435 tr_free( node ); 435 436 tor->recheckState = TR_RECHECK_NONE; -
trunk/libtransmission/peer-mgr.c
r3552 r3606 442 442 * so that being on same local network gives us the same allowed pieces */ 443 443 444 uint8_t *seed; 445 char buf[4]; 446 uint32_t allowedPieceCount = 0; 447 tr_bitfield_t * ret; 448 444 449 printf( "%d piece allowed fast set for torrent with %d pieces and hex infohash\n", setCount, pieceCount ); 445 450 printf( "%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x for node with IP %s:\n", … … 448 453 inet_ntoa( *ip ) ); 449 454 450 uint8_t *seed = malloc(4 + SHA_DIGEST_LENGTH); 451 char buf[4]; 452 uint32_t allowedPieceCount = 0; 453 tr_bitfield_t * ret; 455 seed = malloc(4 + SHA_DIGEST_LENGTH); 454 456 455 457 ret = tr_bitfieldNew( pieceCount ); … … 1691 1693 { 1692 1694 tr_peerMgr * mgr = t->manager; 1693 1694 1695 struct peer_atom * atom = candidates[i]; 1695 1696 1696 tr_peerIo * io; 1697 tr_handshake * handshake; 1697 1698 1698 1699 tordbg( t, "Starting an OUTGOING connection with %s", … … 1701 1702 io = tr_peerIoNewOutgoing( mgr->handle, &atom->addr, atom->port, t->hash ); 1702 1703 1703 tr_handshake *handshake = tr_handshakeNew( io,1704 1705 1706 1704 handshake = tr_handshakeNew( io, 1705 mgr->handle->encryptionMode, 1706 myHandshakeDoneCB, 1707 mgr ); 1707 1708 1708 1709 assert( tr_peerIoGetTorrentHash( io ) != NULL ); -
trunk/libtransmission/peer-msgs.c
r3599 r3606 1693 1693 else { 1694 1694 /* This peer is fastpeer-enabled, send it have-all or have-none if appropriate */ 1695 uint32_t peerProgress; 1695 1696 float completion = tr_cpPercentComplete( m->torrent->completion ); 1696 1697 if ( completion == 0.0f ) { … … 1701 1702 sendBitfield( m ); 1702 1703 } 1703 uint32_tpeerProgress = m->torrent->info.pieceCount * m->info->progress;1704 peerProgress = m->torrent->info.pieceCount * m->info->progress; 1704 1705 1705 1706 if ( peerProgress < MAX_ALLOWED_SET_COUNT )
Note: See TracChangeset
for help on using the changeset viewer.