- Timestamp:
- Feb 4, 2009, 6:54:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/tracker.c
r7826 r7827 837 837 struct tr_tracker_handle 838 838 { 839 tr_bool shutdownHint; 839 840 int runningCount; 840 841 tr_timer * pulseTimer; … … 855 856 void 856 857 tr_trackerSessionClose( tr_session * session ) 858 { 859 assert( tr_isSession( session ) ); 860 861 session->tracker->shutdownHint = TRUE; 862 } 863 864 static void 865 tr_trackerSessionDestroy( tr_session * session ) 857 866 { 858 867 if( session && session->tracker ) … … 944 953 const time_t now = time( NULL ); 945 954 946 if( ! session->tracker)955 if( !th ) 947 956 return FALSE; 948 957 … … 979 988 980 989 /* free the tracker manager if no torrents are left */ 981 if( ( session->tracker ) 982 && ( session->tracker->runningCount < 1 ) 983 && ( tr_sessionCountTorrents( session ) == 0 ) ) 984 { 985 tr_trackerSessionClose( session ); 986 } 987 988 /* if there are still running torrents (as indicated by 989 * the existence of the tracker manager) then keep the 990 * trackerPulse() timer alive */ 991 return session->tracker != NULL; 990 if( ( th != NULL ) 991 && ( th->shutdownHint != FALSE ) 992 && ( th->runningCount < 1 ) 993 && ( tr_sessionCountTorrents( session ) == 0 ) ) 994 { 995 tr_trackerSessionDestroy( session ); 996 return FALSE; 997 } 998 999 return TRUE; 992 1000 } 993 1001
Note: See TracChangeset
for help on using the changeset viewer.