From 296e50f4bb9299b82fe44cb343fad2556cc62e25 Mon Sep 17 00:00:00 2001 From: kanoi Date: Tue, 3 May 2016 05:21:00 +1000 Subject: [PATCH] ckdb - max_sockd counter must use locked access --- src/ckdb.c | 2 +- src/ckdb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index fe8f1a53..2019dfbd 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -5656,9 +5656,9 @@ static void *socketer(void *arg) copy_tv(&(bq->now), &now); bq->seqentryflags = seqentryflags; bq->sockd = sockd; + K_WLOCK(breakqueue_free); if (max_sockd_count < ++sockd_count) max_sockd_count = sockd_count; - K_WLOCK(breakqueue_free); k_add_tail(cmd_breakqueue_store, bq_item); K_WUNLOCK(breakqueue_free); setnow(&now2); diff --git a/src/ckdb.h b/src/ckdb.h index 7900877c..3c4874c2 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -52,7 +52,7 @@ #define DB_VLOCK "1" #define DB_VERSION "1.0.5" -#define CKDB_VERSION DB_VERSION"-2.101" +#define CKDB_VERSION DB_VERSION"-2.102" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__