Changeset 9522


Ignore:
Timestamp:
Nov 14, 2009, 2:43:31 PM (13 years ago)
Author:
charles
Message:

(trunk) #2222: revert r8967, as foreshadowed in http://trac.transmissionbt.com/ticket/2222#comment:20

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r9500 r9522  
    209209
    210210
    211 AC_ARG_ENABLE([dht],
    212               AS_HELP_STRING([--disable-dht],[omit DHT support]),
    213               [enable_dht=${enableval}],
    214               [enable_dht=yes])
    215 if test "x$enable_dht" = "xno" ; then
    216     AC_DEFINE([WITHOUT_DHT], 1)
    217     DHT_CFLAGS=""
    218     DHT_LIBS=""
    219 else
    220     DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
    221     DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
    222 fi
    223 AM_CONDITIONAL(DHT, test "x$enable_dht" = "xyes")
     211DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
     212DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
    224213AC_SUBST(DHT_CFLAGS)
    225214AC_SUBST(DHT_LIBS)
  • trunk/gtk/tr-prefs.c

    r9486 r9522  
    541541    hig_workarea_add_wide_control( t, &row, w );
    542542
    543 #ifndef WITHOUT_DHT
    544543    s = _( "Use _DHT to find more peers" );
    545544    w = new_check_button( s, TR_PREFS_KEY_DHT_ENABLED, core );
     
    547546    gtr_widget_set_tooltip_text( w, s );
    548547    hig_workarea_add_wide_control( t, &row, w );
    549 #endif
    550548
    551549    hig_workarea_finish( t, &row );
  • trunk/libtransmission/session.c

    r9417 r9522  
    701701    if( session->isDHTEnabled )
    702702    {
    703 #ifdef WITHOUT_DHT
    704         tr_inf( "DHT disabled by packager." );
    705 #else
    706703        tr_dhtInit( session, &session->public_ipv4->addr );
    707 #endif
    708704    }
    709705
     
    17051701tr_sessionAllowsDHT( const tr_session * session UNUSED )
    17061702{
    1707 #ifdef WITHOUT_DHT
    1708     return 0;
    1709 #else
    17101703    return tr_sessionIsDHTEnabled( session );
    1711 #endif
    17121704}
    17131705
  • trunk/libtransmission/tr-dht.c

    r9476 r9522  
    5050#include "utils.h"
    5151#include "version.h"
    52 
    53 #ifdef WITHOUT_DHT
    54 
    55   /**
    56   *** These are the stubs for when we're building without DHT support
    57   **/
    58 
    59   int tr_dhtInit( tr_session * session UNUSED,
    60                   tr_address * address UNUSED ) { return TR_DHT_STOPPED; }
    61 
    62   void tr_dhtUninit( tr_session * session UNUSED ) { }
    63 
    64   tr_bool tr_dhtEnabled( const tr_session * session UNUSED ) { return FALSE; }
    65 
    66   tr_port tr_dhtPort ( const tr_session * sesssion UNUSED ) { return 0; }
    67 
    68   int tr_dhtStatus( tr_session * session     UNUSED,
    69                     int        * setmeCount  UNUSED ) { return TR_DHT_STOPPED; }
    70 
    71   int tr_dhtAddNode( tr_session       * session    UNUSED,
    72                      const tr_address * addr       UNUSED,
    73                      tr_port            port       UNUSED,
    74                      tr_bool            bootstrap  UNUSED ) { return 0; }
    75 
    76   int tr_dhtAnnounce( tr_torrent * session UNUSED,
    77                       tr_bool announce UNUSED ) { return -1; }
    78 
    79 
    80 #else
    8152
    8253static int dht_socket;
     
    471442    return size;
    472443}
    473 
    474 #endif
  • trunk/third-party/Makefile.am

    r8967 r9522  
    1 if DHT
    2   DHT_DIR = dht
    3 else
    4   DHT_DIR =
    5 endif
    6 
    7 SUBDIRS = libnatpmp miniupnp libevent $(DHT_DIR)
     1SUBDIRS = libnatpmp miniupnp libevent dht
    82
    93EXTRA_DIST = \
Note: See TracChangeset for help on using the changeset viewer.