summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/fuse/fuseFiles.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp
index a3c9dd4..61f965a 100644
--- a/netfs/fuse/fuseFiles.cpp
+++ b/netfs/fuse/fuseFiles.cpp
@@ -16,10 +16,13 @@
#include <vector>
namespace NetFS {
+ constexpr size_t MESSAGE_SIZE_HEADROOM = 1024;
+
FuseApp::OpenFile::WriteState::WriteState() : future(promise.get_future().share()) { }
FuseApp::OpenFile::OpenFile(FilePrxPtr remotePrx, std::string remotePath, int openFlags, size_t messageMaxSize) :
- remote(std::move(remotePrx)), path(std::move(remotePath)), flags(openFlags), bodyMaxSize(messageMaxSize - 1024)
+ remote(std::move(remotePrx)), path(std::move(remotePath)), flags(openFlags),
+ bodyMaxSize(messageMaxSize - MESSAGE_SIZE_HEADROOM)
{
}