Changeset 10623


Ignore:
Timestamp:
May 2, 2010, 12:48:33 PM (8 years ago)
Author:
livings124
Message:

#2738 Fix the IPv6 DHT broken by r10616

File:
1 edited

Legend:

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

    r10616 r10623  
    249249
    250250static int
    251 rebind_ipv6(void)
     251rebind_ipv6(tr_bool force)
    252252{
    253253    struct sockaddr_in6 sin6;
     
    259259    /* We currently have no way to enable or disable IPv6 once the DHT has
    260260       been initialised.  Oh, well. */
    261     if(dht6_socket < 0 || ipv6 == NULL) {
     261    if(ipv6 == NULL || (!force && dht6_socket < 0)) {
    262262        if(last_bound) {
    263263            free(last_bound);
     
    343343
    344344    if(tr_globalIPv6())
    345         rebind_ipv6();
     345        rebind_ipv6(TRUE);
    346346
    347347    if( getenv( "TR_DHT_VERBOSE" ) != NULL )
     
    709709    count++;
    710710    if(count >= 20) {
    711         rebind_ipv6();
     711        rebind_ipv6(FALSE);
    712712        count = 0;
    713713    }
Note: See TracChangeset for help on using the changeset viewer.