loolwsd/configure.ac | 5 +++++ 1 file changed, 5 insertions(+) New commits: commit 195936ffa1cb72078df722d4103fe476d2792a4f Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Oct 23 13:30:54 2016 -0400
loolwsd: prevent configuring max_connections less than max_documents It would be nonsensical to allow less connections than documents since each document must, by definition, have at least a single connection. This prevents blocking new documents because of connection limit. If that were the intention, max_documents should be lowered to match max_connections. Change-Id: Ide07e977f548ed917c6e51a2ba88f3cc07947efe Reviewed-on: https://gerrit.libreoffice.org/30209 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac index de85b38..9b6fc3d 100644 --- a/loolwsd/configure.ac +++ b/loolwsd/configure.ac @@ -141,6 +141,11 @@ AS_IF([test -n "$with_max_connections"], AC_DEFINE_UNQUOTED([MAX_CONNECTIONS],[$MAX_CONNECTIONS],[Limit the maximum number of open connections]) AC_SUBST(MAX_CONNECTIONS) +if test $MAX_CONNECTIONS -lt $MAX_DOCUMENTS; then + AC_MSG_ERROR([Each document must have at least one connection, therefore, max_connections cannot be less than + max_documents.]) +fi + # Test for build environment CXXFLAGS="$CXXFLAGS -std=c++11" _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits