From: Vsevolod Stakhov Date: Tue, 21 Apr 2015 15:09:41 +0000 (+0100) Subject: Use 64 bit hash for logger. X-Git-Tag: 0.9.0~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85f08724d0c9d5461ce00e1d86217753afe2681c;p=thirdparty%2Frspamd.git Use 64 bit hash for logger. --- diff --git a/src/libutil/logger.c b/src/libutil/logger.c index fdfc79ba7f..b948deaf17 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -56,10 +56,10 @@ struct rspamd_logger_s { sig_atomic_t do_reopen_log; enum rspamd_log_type type; pid_t pid; + guint32 repeats; GQuark process_type; radix_compressed_t *debug_ip; - guint32 last_line_cksum; - guint32 repeats; + guint64 last_line_cksum; gchar *saved_message; gchar *saved_function; rspamd_mempool_t *pool; @@ -83,10 +83,10 @@ file_log_function (const gchar * log_domain, const gchar *function, /** * Calculate checksum for log line (used for repeating logic) */ -static inline guint32 +static inline guint64 rspamd_log_calculate_cksum (const gchar *message, size_t mlen) { - return XXH32 (message, mlen, rspamd_hash_seed ()); + return XXH64 (message, mlen, rspamd_hash_seed ()); } /*