From c05775cf4c75542f765440c701be929160dc3e5d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 1 Sep 2015 15:03:40 +0200 Subject: [PATCH] Log total sessions they are created/destructed --- src/session.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/session.c b/src/session.c index 41447c6..4145974 100644 --- a/src/session.c +++ b/src/session.c @@ -1048,8 +1048,9 @@ void session_apply_setting(struct session *se, const char *dbname, void session_destroy(struct session *se) { struct session_database *sdb; - session_log(se, YLOG_LOG, "destroy"); - session_use(-1); + int i = session_use(-1); + + session_log(se, YLOG_LOG, "destroy %d", i); session_remove_cached_clients(se); for (sdb = se->databases; sdb; sdb = sdb->next) @@ -1121,9 +1122,9 @@ struct session *new_session(NMEM nmem, struct conf_service *service, session->normalize_cache = normalize_cache_create(); session->session_mutex = 0; pazpar2_mutex_create(&session->session_mutex, tmp_str); - session_log(session, YLOG_LOG, "create"); - session_use(1); + i = session_use(1); + session_log(session, YLOG_LOG, "create %d", i); return session; } -- 1.7.10.4