Mercurial > dovecot > core-2.2
changeset 3644:6a94b8412638 HEAD
Don't crash with SIGUSR2 if auth cache hasn't seen any hits
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 07 Oct 2005 13:23:01 +0300 |
parents | 5207179e47de |
children | 81180ca12997 |
files | src/auth/auth-cache.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-cache.c Fri Oct 07 13:22:47 2005 +0300 +++ b/src/auth/auth-cache.c Fri Oct 07 13:23:01 2005 +0300 @@ -112,7 +112,7 @@ total_count = cache->hit_count + cache->miss_count; i_info("Authentication cache hits %u/%u (%u%%)", cache->hit_count, total_count, - cache->hit_count * 100 / total_count); + total_count == 0 ? 100 : (cache->hit_count * 100 / total_count)); /* reset hit counter */ cache->hit_count = cache->miss_count = 0;