diff --git a/src/storage/remote/protocol.c b/src/storage/remote/protocol.c index e4f2d7193..ae0ee5d81 100644 --- a/src/storage/remote/protocol.c +++ b/src/storage/remote/protocol.c @@ -14,7 +14,6 @@ Remote Storage Protocol Handler #include "common/log.h" #include "common/regExp.h" #include "common/type/pack.h" -#include "common/type/json.h" #include "config/config.h" #include "protocol/helper.h" #include "storage/remote/protocol.h" @@ -356,7 +355,7 @@ storageRemoteOpenReadProtocol(PackRead *const param, ProtocolServer *const serve const String *file = pckReadStrP(param); bool ignoreMissing = pckReadBoolP(param); const uint64_t offset = pckReadU64P(param); - const Variant *limit = jsonToVar(pckReadStrP(param)); + const Variant *const limit = pckReadNullP(param) ? NULL : VARUINT64(pckReadU64P(param)); const Pack *const filter = pckReadPackP(param); // Create the read object diff --git a/src/storage/remote/read.c b/src/storage/remote/read.c index e8e7c086f..a089acdc7 100644 --- a/src/storage/remote/read.c +++ b/src/storage/remote/read.c @@ -11,7 +11,6 @@ Remote Storage Read #include "common/io/read.h" #include "common/log.h" #include "common/type/convert.h" -#include "common/type/json.h" #include "common/type/object.h" #include "storage/remote/protocol.h" #include "storage/remote/read.h" @@ -75,7 +74,12 @@ storageReadRemoteOpen(THIS_VOID) pckWriteStrP(param, this->interface.name); pckWriteBoolP(param, this->interface.ignoreMissing); pckWriteU64P(param, this->interface.offset); - pckWriteStrP(param, jsonFromVar(this->interface.limit)); + + if (this->interface.limit == NULL) + pckWriteNullP(param); + else + pckWriteU64P(param, varUInt64(this->interface.limit)); + pckWritePackP(param, ioFilterGroupParamAll(ioReadFilterGroup(storageReadIo(this->read)))); protocolClientCommandPut(this->client, command, false); diff --git a/src/storage/remote/storage.c b/src/storage/remote/storage.c index b55a2edbd..0e7833234 100644 --- a/src/storage/remote/storage.c +++ b/src/storage/remote/storage.c @@ -6,7 +6,6 @@ Remote Storage #include "common/debug.h" #include "common/log.h" #include "common/memContext.h" -#include "common/type/json.h" #include "common/type/object.h" #include "common/type/pack.h" #include "storage/remote/protocol.h" diff --git a/src/storage/remote/write.c b/src/storage/remote/write.c index c5c8f95ec..4e95f1fb1 100644 --- a/src/storage/remote/write.c +++ b/src/storage/remote/write.c @@ -8,7 +8,6 @@ Remote Storage File write #include "common/io/io.h" #include "common/io/write.h" #include "common/log.h" -#include "common/type/json.h" #include "common/type/object.h" #include "storage/remote/protocol.h" #include "storage/remote/write.h"