From bfdac5b274d8ca371307d2b4b417092ba25f11ab Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 28 Aug 2013 17:54:19 +0200 Subject: [SERVER] Copy CRC-32 list from uplink server if available Split up helper.c, move file/disk related functions to fileutil.c Uplink: Make sure relayed requests are at least 1MiB --- src/server/globals.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/server/globals.c') diff --git a/src/server/globals.c b/src/server/globals.c index 1e23fb3..ac3f279 100644 --- a/src/server/globals.c +++ b/src/server/globals.c @@ -12,6 +12,7 @@ int _vmdkLegacyMode = FALSE; int _shutdown = 0; int _serverPenalty = 0; int _clientPenalty = 0; +int _isProxy = FALSE; #define SAVE_TO_VAR_STR(ss, kk) do { if (strcmp(section, #ss) == 0 && strcmp(key, #kk) == 0) { if (_ ## kk != NULL) free(_ ## kk); _ ## kk = strdup(value); } } while (0) #define SAVE_TO_VAR_BOOL(ss, kk) do { if (strcmp(section, #ss) == 0 && strcmp(key, #kk) == 0) _ ## kk = atoi(value) != 0 || strcmp(value, "true") == 0 || strcmp(value, "True") == 0 || strcmp(value, "TRUE") == 0; } while (0) @@ -19,8 +20,9 @@ int _clientPenalty = 0; static int ini_handler(void *custom, const char* section, const char* key, const char* value) { - SAVE_TO_VAR_STR( dnbd3, basePath ); + if ( _basePath == NULL ) SAVE_TO_VAR_STR( dnbd3, basePath ); SAVE_TO_VAR_BOOL( dnbd3, vmdkLegacyMode ); + SAVE_TO_VAR_BOOL( dnbd3, isProxy ); SAVE_TO_VAR_INT( dnbd3, serverPenalty ); SAVE_TO_VAR_INT( dnbd3, clientPenalty ); return TRUE; -- cgit v1.2.3-55-g7522