From f996c4fbb9a3e37316584a78029e76cc2ab142b8 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 18 Mar 2011 17:11:42 +0000 Subject: [PATCH] (trunk libT) #4114 "crash on open r12168 in tau_sendto()" -- fixed. --- libtransmission/announcer-udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/announcer-udp.c b/libtransmission/announcer-udp.c index d54593598..99e47b6ca 100644 --- a/libtransmission/announcer-udp.c +++ b/libtransmission/announcer-udp.c @@ -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 );