Changeset 9522
- Timestamp:
- Nov 14, 2009, 2:43:31 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r9500 r9522 209 209 210 210 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") 211 DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht" 212 DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a" 224 213 AC_SUBST(DHT_CFLAGS) 225 214 AC_SUBST(DHT_LIBS) -
trunk/gtk/tr-prefs.c
r9486 r9522 541 541 hig_workarea_add_wide_control( t, &row, w ); 542 542 543 #ifndef WITHOUT_DHT544 543 s = _( "Use _DHT to find more peers" ); 545 544 w = new_check_button( s, TR_PREFS_KEY_DHT_ENABLED, core ); … … 547 546 gtr_widget_set_tooltip_text( w, s ); 548 547 hig_workarea_add_wide_control( t, &row, w ); 549 #endif550 548 551 549 hig_workarea_finish( t, &row ); -
trunk/libtransmission/session.c
r9417 r9522 701 701 if( session->isDHTEnabled ) 702 702 { 703 #ifdef WITHOUT_DHT704 tr_inf( "DHT disabled by packager." );705 #else706 703 tr_dhtInit( session, &session->public_ipv4->addr ); 707 #endif708 704 } 709 705 … … 1705 1701 tr_sessionAllowsDHT( const tr_session * session UNUSED ) 1706 1702 { 1707 #ifdef WITHOUT_DHT1708 return 0;1709 #else1710 1703 return tr_sessionIsDHTEnabled( session ); 1711 #endif1712 1704 } 1713 1705 -
trunk/libtransmission/tr-dht.c
r9476 r9522 50 50 #include "utils.h" 51 51 #include "version.h" 52 53 #ifdef WITHOUT_DHT54 55 /**56 *** These are the stubs for when we're building without DHT support57 **/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 #else81 52 82 53 static int dht_socket; … … 471 442 return size; 472 443 } 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) 1 SUBDIRS = libnatpmp miniupnp libevent dht 8 2 9 3 EXTRA_DIST = \
Note: See TracChangeset
for help on using the changeset viewer.