1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 11:23:40 +00:00

(trunk libT) #4114 "crash on open r12168 in tau_sendto()" -- fixed.

This commit is contained in:
Jordan Lee 2011-03-18 17:11:42 +00:00
parent fe6665f68c
commit f996c4fbb9

View file

@ -592,7 +592,7 @@ tau_tracker_upkeep( struct tau_tracker * tracker )
{
tr_bool remove_request = FALSE;
struct tau_announce_request * req = tr_ptrArrayNth( reqs, i );
if( is_connected && !req->sent_at ) {
if( is_connected && !req->sent_at && tracker->addr ) {
dbgmsg( tracker->key, "Sending an announce request" );
req->sent_at = now;
tau_tracker_send_request( tracker, req->payload, req->payload_len );
@ -618,7 +618,7 @@ tau_tracker_upkeep( struct tau_tracker * tracker )
{
tr_bool remove_request = FALSE;
struct tau_scrape_request * req = tr_ptrArrayNth( reqs, i );
if( is_connected && !req->sent_at ) {
if( is_connected && !req->sent_at && tracker->addr ) {
dbgmsg( tracker->key, "Sending a scrape request" );
req->sent_at = now;
tau_tracker_send_request( tracker, req->payload, req->payload_len );