Changeset 9632


Ignore:
Timestamp:
Nov 29, 2009, 6:31:36 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2576 "IPv6 support for DHT (BEP #32)" -- silence message "IPv6 DHT not ready." Reported by KyleK; fixed by jch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tr-dht.c

    r9599 r9632  
    507507    struct getstatus_closure closure = { af, -1, -1 };
    508508
    509     if( !tr_dhtEnabled( ss ) )
     509    if( !tr_dhtEnabled( ss ) ||
     510        (af == AF_INET && dht_socket < 0) ||
     511        (af == AF_INET6 && dht6_socket < 0) ) {
     512        if( nodes_return )
     513            *nodes_return = 0;
    510514        return TR_DHT_STOPPED;
    511 
    512     if(dht_socket < 0 && dht6_socket < 0)
    513         return TR_DHT_STOPPED;
    514 
    515     if(af == AF_INET && dht_socket < 0)
    516         return TR_DHT_STOPPED;
    517 
    518     if(af == AF_INET6 && dht6_socket < 0)
    519         return TR_DHT_STOPPED;
     515    }
    520516
    521517    tr_runInEventThread( ss, getstatus, &closure );
     
    636632
    637633    status = tr_dhtStatus( tor->session, af, &numnodes );
     634
     635    if( status == TR_DHT_STOPPED ) {
     636        /* Let the caller believe everything is all right. */
     637        return 1;
     638    }
     639
    638640    if(status >= TR_DHT_POOR ) {
    639641        rc = dht_search( tor->info.hash,
Note: See TracChangeset for help on using the changeset viewer.