From 16482aa018299bf48f6cdf93f19a9103307d87e8 Mon Sep 17 00:00:00 2001 From: Michael Sabo Date: Mon, 2 Oct 2017 17:21:43 +0200 Subject: [PATCH] Precompiler setting for max packet size --- src/bson/builder.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bson/builder.h b/src/bson/builder.h index 141973d..3920348 100755 --- a/src/bson/builder.h +++ b/src/bson/builder.h @@ -44,13 +44,16 @@ namespace _bson { update $push (append) operation various db.eval() type operations */ - const int BSONObjMaxUserSize = 16 * 1024 * 1024; +#ifndef MAX_BSON_PACKET_SIZE +#define MAX_BSON_PACKET_SIZE 16 * 1024 * 1024 +#endif + const unsigned int BSONObjMaxUserSize = MAX_BSON_PACKET_SIZE; /* Sometimes we need objects slightly larger - an object in the replication local.oplog is slightly larger than a user object for example. */ - const int BSONObjMaxInternalSize = BSONObjMaxUserSize + ( 16 * 1024 ); + const unsigned int BSONObjMaxInternalSize = BSONObjMaxUserSize + ( 16 * 1024 ); const int BufferMaxSize = 64 * 1024 * 1024;