diff options
author | Simon Rettberg | 2014-12-22 15:51:30 +0100 |
---|---|---|
committer | Simon Rettberg | 2014-12-22 15:51:30 +0100 |
commit | cce7cf2c1428d174dd49177358dc52b234e97e5c (patch) | |
tree | db0fa8c046e5c694bde7ff5afdff96c773ad6d64 /src/server/globals.c | |
parent | get-version.sh will always work in the directory it's placed in (diff) | |
download | dnbd3-cce7cf2c1428d174dd49177358dc52b234e97e5c.tar.gz dnbd3-cce7cf2c1428d174dd49177358dc52b234e97e5c.tar.xz dnbd3-cce7cf2c1428d174dd49177358dc52b234e97e5c.zip |
[SERVER] Configurable client timeout, adaptive replication speed (to be tested against varying bw/latency), retry sendfile call if ret <= len
Diffstat (limited to 'src/server/globals.c')
-rw-r--r-- | src/server/globals.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/globals.c b/src/server/globals.c index 3fcb61d..a9aca77 100644 --- a/src/server/globals.c +++ b/src/server/globals.c @@ -15,6 +15,7 @@ int _clientPenalty = 0; int _isProxy = FALSE; int _proxyPrivateOnly = FALSE; int _uplinkTimeout = 1250; +int _clientTimeout = 15000; #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) @@ -29,6 +30,7 @@ static int ini_handler(void *custom, const char* section, const char* key, const SAVE_TO_VAR_INT( dnbd3, serverPenalty ); SAVE_TO_VAR_INT( dnbd3, clientPenalty ); SAVE_TO_VAR_INT( dnbd3, uplinkTimeout ); + SAVE_TO_VAR_INT( dnbd3, clientTimeout ); return TRUE; } |