1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-03 18:25:35 +00:00

tr_trackerCanManualAnnounce() should return false immediately after the user's manually announced; not just after the announce request is processed by the tracker

This commit is contained in:
Charles Kerr 2007-08-01 13:33:01 +00:00
parent 5c8cc737b8
commit 8aebe31de1
2 changed files with 4 additions and 1 deletions

View file

@ -28,6 +28,7 @@
#ifdef WIN32 #ifdef WIN32
#include <stdint.h> #include <stdint.h>
#include <winsock2.h> #include <winsock2.h>
typedef int socklen_t;
typedef uint16_t tr_port_t; typedef uint16_t tr_port_t;
#else #else
#include <sys/socket.h> #include <sys/socket.h>

View file

@ -199,7 +199,9 @@ static void failureAnnouncing( tr_tracker_t * tc )
int int
tr_trackerCanManualAnnounce( const tr_tracker_t * tc ) tr_trackerCanManualAnnounce( const tr_tracker_t * tc )
{ {
return tc && ((tc->dateOk + MANUAL_ANNOUNCE_INTERVAL_MSEC) < tr_date()); return tc
&& !tc->forceAnnounce
&& ((tc->dateOk + MANUAL_ANNOUNCE_INTERVAL_MSEC) < tr_date());
} }
static int shouldConnect( tr_tracker_t * tc ) static int shouldConnect( tr_tracker_t * tc )