From 5ca73f864f1185e855cd525b71c29ccd3c5e7f97 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 18 Jul 2013 15:24:09 -0700 Subject: [PATCH] Tweak reader checks Use mti_numreaders for loop limit, not me_maxreaders. --- libraries/liblmdb/mdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index b36ff2bb4f..a4f6238e00 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7999,7 +7999,7 @@ int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx) if (!env->me_txns) { return func("(no reader locks)\n", ctx); } - rdrs = env->me_maxreaders; + rdrs = env->me_txns->mti_numreaders; mr = env->me_txns->mti_readers; for (i=0; ime_txns) return MDB_SUCCESS; - rdrs = env->me_maxreaders; + rdrs = env->me_txns->mti_numreaders; pids = malloc((rdrs+1) * sizeof(pid_t)); if (!pids) return ENOMEM; -- 2.39.5