summaryrefslogtreecommitdiffstats
path: root/src/shared/protocol.h
diff options
context:
space:
mode:
authorSimon Rettberg2020-07-27 12:56:35 +0200
committerSimon Rettberg2020-07-27 12:56:35 +0200
commit1f212fa1fd0a381b42175dc1bac79baa164e1e45 (patch)
tree7d911d7fe40817cbb433acebc3ed735eafe9c6df /src/shared/protocol.h
parent[FUSE] Tweak timeout values to prevent stale status file (diff)
parent[SERVER] Fix: NULL pointer access in saveLoadAllCacheMaps() (diff)
downloaddnbd3-1f212fa1fd0a381b42175dc1bac79baa164e1e45.tar.gz
dnbd3-1f212fa1fd0a381b42175dc1bac79baa164e1e45.tar.xz
dnbd3-1f212fa1fd0a381b42175dc1bac79baa164e1e45.zip
Merge branch 'no-working-flag' into fuse_ll
Diffstat (limited to 'src/shared/protocol.h')
-rw-r--r--src/shared/protocol.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/protocol.h b/src/shared/protocol.h
index 92dbe11..05fd2bf 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 ( (_pretendClient ? 0 : FLAGS8_SERVER) | (_backgroundReplication == BGR_FULL ? FLAGS8_BG_REP : 0) )
+#define SI_SERVER_FLAGS ( (uint8_t)( (_pretendClient ? 0 : FLAGS8_SERVER) | (_backgroundReplication == BGR_FULL ? FLAGS8_BG_REP : 0) ) )
#define REPLY_OK (0)
#define REPLY_ERRNO (-1)
@@ -69,10 +69,8 @@ static inline bool dnbd3_select_image(int sock, const char *name, uint16_t rid,
request.magic = dnbd3_packet_magic;
request.cmd = CMD_SELECT_IMAGE;
request.size = (uint32_t)len;
-#ifdef _DEBUG
request.handle = 0;
request.offset = 0;
-#endif
fixup_request( request );
iov[0].iov_base = &request;
iov[0].iov_len = sizeof(request);