Changeset 3337
- Timestamp:
- Oct 9, 2007, 4:50:10 AM (15 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/peer-mgr.c
r3322 r3337 1612 1612 const int peerCount = tr_ptrArraySize( t->peers ); 1613 1613 1614 tordbg( t, "RECONNECT pulse for [%s]: %d weak connections, %d connection candidates, %d atoms, max per pulse is %d", 1615 t->tor->info.name, nWeak, nCandidates, tr_ptrArraySize(t->pool), (int)MAX_RECONNECTIONS_PER_PULSE ); 1614 if( nWeak || nCandidates ) 1615 tordbg( t, "reconnect pulse for [%s]: %d weak connections, " 1616 "%d connection candidates, %d atoms, max per pulse is %d", 1617 t->tor->info.name, nWeak, nCandidates, 1618 tr_ptrArraySize(t->pool), 1619 (int)MAX_RECONNECTIONS_PER_PULSE ); 1616 1620 1617 1621 /* disconnect some peers */ -
trunk/libtransmission/tracker.c
r3336 r3337 49 49 #define STOPPING_TIMEOUT_INTERVAL_SEC 8 50 50 51 /* the value of the 'numwant' argument passed in tracker requests */ 52 #define NUMWANT 128 51 /* the value of the 'numwant' argument passed in tracker requests. 52 * this should be big, but if it's *too* big trackers will ignore it */ 53 #define NUMWANT 50 53 54 54 55 /* the length of the 'key' argument passed in tracker requests */ … … 745 746 const char * eventName ) 746 747 { 747 const int stopping = !strcmp( eventName, "stopped" );748 const int numwant = stopping ? 0 : NUMWANT;748 const int isStopping = !strcmp( eventName, "stopped" ); 749 const int numwant = isStopping ? 0 : NUMWANT; 749 750 char buf[4096]; 750 751 … … 976 977 { 977 978 Torrent * t = (Torrent *) vt; 979 const int isStopping = eventName && !strcmp( eventName, "stopped" ); 978 980 const tr_tracker_info * address = getCurrentAddress( t->tracker ); 979 981 char * uri; … … 1004 1006 tr_free( t->lastRequest ); 1005 1007 t->lastRequest = tr_strdup( eventName ); 1006 if( !eventName || !strcmp( eventName, "stopped" ) ) { 1008 if( isStopping ) { 1009 evhttp_connection_set_timeout( evcon, STOPPING_TIMEOUT_INTERVAL_SEC ); 1010 httpReq = evhttp_request_new( onStoppedResponse, t->tracker->handle ); 1011 } else { 1007 1012 evhttp_connection_set_timeout( evcon, TIMEOUT_INTERVAL_SEC ); 1008 1013 httpReq = evhttp_request_new( onTrackerResponse, onTrackerResponseDataNew(t) ); 1009 } else {1010 evhttp_connection_set_timeout( evcon, STOPPING_TIMEOUT_INTERVAL_SEC );1011 httpReq = evhttp_request_new( onStoppedResponse, t->tracker->handle );1012 1014 } 1013 1015 addCommonHeaders( t->tracker, httpReq );
Note: See TracChangeset
for help on using the changeset viewer.