From: Adam Dickmeiss Date: Tue, 1 Sep 2015 13:03:40 +0000 (+0200) Subject: Log total sessions they are created/destructed X-Git-Tag: v1.12.3~10 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=c05775cf4c75542f765440c701be929160dc3e5d Log total sessions they are created/destructed --- 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; }