Changeset 3605
- Timestamp:
- Oct 27, 2007, 9:29:39 PM (15 years ago)
- Location:
- branches/0.9x
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9x/configure.ac
r3537 r3605 39 39 AC_SEARCH_LIBS([socket], [socket net]) 40 40 AC_SEARCH_LIBS([gethostbyname], [nsl bind]) 41 42 dnl ---------------------------------------------------------------------------- 43 dnl 44 dnl va_copy 45 46 AC_MSG_CHECKING([how to copy va_list]) 47 AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);], 48 AC_MSG_RESULT([va_copy]), 49 [ AH_TEMPLATE([va_copy], [define if va_copy is not available]) 50 AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);], 51 [ AC_DEFINE([va_copy], [__va_copy]) 52 AC_MSG_RESULT([__va_copy])], 53 [ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))]) 54 AC_MSG_RESULT([memcpy])] 55 ) 56 ]) 57 41 58 42 59 dnl ---------------------------------------------------------------------------- -
branches/0.9x/gtk/tr_torrent.c
r3484 r3605 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; -
branches/0.9x/libtransmission/handshake.c
r3508 r3605 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 ); -
branches/0.9x/libtransmission/inout.c
r3571 r3605 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; -
branches/0.9x/libtransmission/peer-mgr.c
r3553 r3605 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 ); -
branches/0.9x/libtransmission/peer-msgs.c
r3598 r3605 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.