diff options
author | Simon Rettberg | 2019-07-23 17:21:29 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-23 17:24:27 +0200 |
commit | a61b4f18a1f9dcb78dba4bcde48a9318b04a45ec (patch) | |
tree | efcd06d888729bc60b53bcd9864e4c97b700010f /src/shared/protocol.h | |
parent | [SERVER] uplink: Relay request in client's thread if possible (diff) | |
download | dnbd3-a61b4f18a1f9dcb78dba4bcde48a9318b04a45ec.tar.gz dnbd3-a61b4f18a1f9dcb78dba4bcde48a9318b04a45ec.tar.xz dnbd3-a61b4f18a1f9dcb78dba4bcde48a9318b04a45ec.zip |
[SERVER] Add pretendClient config option
This makes the server not set the FLAGS8_SERVER flag
when establishing an uplink connection. Useful mostly
for running a proxy on localhost for local caching.
Diffstat (limited to 'src/shared/protocol.h')
-rw-r--r-- | src/shared/protocol.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/protocol.h b/src/shared/protocol.h index d87bbd8..92dbe11 100644 --- a/src/shared/protocol.h +++ b/src/shared/protocol.h @@ -20,7 +20,7 @@ #define COND_HOPCOUNT(vers,hopcount) ( (vers) >= 3 ? (hopcount) : 0 ) // 2017-11-02: Macro to set flags in select image message properly if we're a server, as BG_REP depends on global var -#define SI_SERVER_FLAGS ( FLAGS8_SERVER | (_backgroundReplication == BGR_FULL ? FLAGS8_BG_REP : 0) ) +#define SI_SERVER_FLAGS ( (_pretendClient ? 0 : FLAGS8_SERVER) | (_backgroundReplication == BGR_FULL ? FLAGS8_BG_REP : 0) ) #define REPLY_OK (0) #define REPLY_ERRNO (-1) |