Changeset 8881


Ignore:
Timestamp:
Aug 7, 2009, 2:47:46 PM (13 years ago)
Author:
charles
Message:

(trunk libT) committed patfch from gornack (proofed by juliusz) for ticket #2312 to use the bind-address-ipv4 setting in the DHT announce

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/session.c

    r8819 r8881  
    849849        tr_inf( "DHT disabled by packager." );
    850850#else
    851         tr_dhtInit( session );
     851        tr_dhtInit( session, &session->public_ipv4->addr );
    852852#endif
    853853    }
     
    16341634
    16351635    if( session->isDHTEnabled )
    1636         tr_dhtInit( session );
     1636        tr_dhtInit( session, &session->public_ipv4->addr );
    16371637}
    16381638
  • trunk/libtransmission/tr-dht.c

    r8880 r8881  
    120120
    121121int
    122 tr_dhtInit(tr_session *ss)
     122tr_dhtInit(tr_session *ss, tr_address * tr_addr)
    123123{
    124124    struct sockaddr_in sin;
     
    147147    memset(&sin, 0, sizeof(sin));
    148148    sin.sin_family = AF_INET;
     149    memcpy(&(sin.sin_addr), &(tr_addr->addr.addr4), sizeof (struct in_addr));
    149150    sin.sin_port = htons(dht_port);
    150151    rc = bind(dht_socket, (struct sockaddr*)&sin, sizeof(sin));
  • trunk/libtransmission/tr-dht.h

    r8880 r8881  
    2727#define TR_DHT_GOOD 4
    2828
    29 int  tr_dhtInit( tr_session * );
     29int  tr_dhtInit( tr_session *, tr_address * );
    3030void tr_dhtUninit( tr_session * );
    3131tr_bool tr_dhtEnabled( const tr_session * );
Note: See TracChangeset for help on using the changeset viewer.