mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
Add a new token, TR_DEFAULT_ENCRYPTION, and use it as the default in the various clients.
Add a new #define, TR_EMBEDDED. When it's set, gettext is disabled and non-encrypted connections are the default.
This commit is contained in:
parent
fc99ff6881
commit
674307add7
7 changed files with 15 additions and 7 deletions
|
@ -43,7 +43,7 @@ static int showInfo = 0;
|
|||
static int showScrape = 0;
|
||||
static int isPrivate = 0;
|
||||
static int verboseLevel = 0;
|
||||
static int encryptionMode = TR_ENCRYPTION_PREFERRED;
|
||||
static int encryptionMode = TR_DEFAULT_ENCRYPTION;
|
||||
static int peerPort = TR_DEFAULT_PORT;
|
||||
static int peerSocketTOS = TR_DEFAULT_PEER_SOCKET_TOS;
|
||||
static int blocklistEnabled = TR_DEFAULT_BLOCKLIST_ENABLED;
|
||||
|
|
|
@ -218,7 +218,7 @@ session_init( const char * configDir,
|
|||
getConfigStr( dict, KEY_USERNAME, &username, NULL );
|
||||
getConfigStr( dict, KEY_PASSWORD, &password, NULL );
|
||||
getConfigInt( dict, KEY_ENCRYPTION, &encryption,
|
||||
TR_ENCRYPTION_PREFERRED );
|
||||
TR_DEFAULT_ENCRYPTION );
|
||||
|
||||
/***
|
||||
****
|
||||
|
|
|
@ -112,7 +112,7 @@ tr_prefs_init_global( void )
|
|||
pref_flag_set_default ( PREF_KEY_PORT_FORWARDING, TRUE );
|
||||
pref_flag_set_default ( PREF_KEY_PEX, TR_DEFAULT_PEX_ENABLED );
|
||||
pref_flag_set_default ( PREF_KEY_ASKQUIT, TRUE );
|
||||
pref_flag_set_default ( PREF_KEY_ENCRYPTION, TR_ENCRYPTION_PREFERRED );
|
||||
pref_flag_set_default ( PREF_KEY_ENCRYPTION, TR_DEFAULT_ENCRYPTION );
|
||||
pref_flag_set_default ( PREF_KEY_LAZY_BITFIELD,
|
||||
TR_DEFAULT_LAZY_BITFIELD_ENABLED );
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ tr_sessionInit( const char * configDir,
|
|||
TR_DEFAULT_PEX_ENABLED,
|
||||
TR_DEFAULT_PORT_FORWARDING_ENABLED,
|
||||
-1, /* public port */
|
||||
TR_ENCRYPTION_PREFERRED, /* encryption mode */
|
||||
TR_DEFAULT_ENCRYPTION, /* encryption mode */
|
||||
TR_DEFAULT_LAZY_BITFIELD_ENABLED,
|
||||
FALSE, /* use upload speed limit? */
|
||||
-1, /* upload speed limit */
|
||||
|
|
|
@ -98,6 +98,12 @@ tr_proxy_type;
|
|||
/** @see tr_sessionInitFull */
|
||||
#define TR_DEFAULT_CONFIG_DIR tr_getDefaultConfigDir( )
|
||||
/** @see tr_sessionInitFull */
|
||||
#ifdef TR_EMBEDDED
|
||||
#define TR_DEFAULT_ENCRYPTION TR_CLEAR_PREFERRED
|
||||
#else
|
||||
#define TR_DEFAULT_ENCRYPTION TR_ENCRYPTION_PREFERRED
|
||||
#endif
|
||||
/** @see tr_sessionInitFull */
|
||||
#define TR_DEFAULT_PEX_ENABLED 1
|
||||
/** @see tr_sessionInitFull */
|
||||
#define TR_DEFAULT_PORT_FORWARDING_ENABLED 0
|
||||
|
|
|
@ -98,9 +98,11 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* #define DISABLE_GETTEXT */
|
||||
#if defined(TR_EMBEDDED) && !defined(DISABLE_GETTEXT)
|
||||
#define DISABLE_GETTEXT
|
||||
#endif
|
||||
#ifdef DISABLE_GETTEXT
|
||||
const char* tr_strip_positional_args( const char* fmt );
|
||||
|
||||
const char * tr_strip_positional_args( const char * fmt );
|
||||
#undef _
|
||||
#define _( a ) tr_strip_positional_args( a )
|
||||
#endif
|
||||
|
|
|
@ -210,7 +210,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
|||
[fDefaults boolForKey: @"PEXGlobal"],
|
||||
[fDefaults boolForKey: @"NatTraversal"],
|
||||
[fDefaults integerForKey: @"BindPort"],
|
||||
TR_ENCRYPTION_PREFERRED, /* reset in prefs */
|
||||
TR_DEFAULT_ENCRYPTION, /* reset in prefs */
|
||||
TR_DEFAULT_LAZY_BITFIELD_ENABLED,
|
||||
NO, /* reset in prefs */
|
||||
-1, /* reset in prefs */
|
||||
|
|
Loading…
Reference in a new issue