summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorSimon Rettberg2018-11-16 10:42:22 +0100
committerSimon Rettberg2018-11-16 10:42:22 +0100
commita28448bce13f0d3c71e0b11e3d7c33663d1a2ee9 (patch)
tree86399f871ee2fa9314e6e6fbf004c684ea859fb9 /src/shared
parent[SERVER] Fix json format string (diff)
downloaddnbd3-a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9.tar.gz
dnbd3-a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9.tar.xz
dnbd3-a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9.zip
[SERVER] Only set BGR flag in handshake for BGR_FULL
_backgroundReplication was still treated as a boolean flag, so a server with BGR_NONE would reject a server with BGR_HASHBLOCK. While this still forces the BGR_NONE proxy to replicate more than it normally would, it seems reasonable to allow this.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/protocol.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/protocol.h b/src/shared/protocol.h
index 6f1cca6..d87bbd8 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 ? FLAGS8_BG_REP : 0) )
+#define SI_SERVER_FLAGS ( FLAGS8_SERVER | (_backgroundReplication == BGR_FULL ? FLAGS8_BG_REP : 0) )
#define REPLY_OK (0)
#define REPLY_ERRNO (-1)