aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libutil/logger.c16
m---------src/rdns0
2 files changed, 2 insertions, 14 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c
index c91d56982..54968ac58 100644
--- a/src/libutil/logger.c
+++ b/src/libutil/logger.c
@@ -28,6 +28,7 @@
#include "util.h"
#include "main.h"
#include "map.h"
+#include "xxhash.h"
/* How much message should be repeated before it is count to be repeated one */
#define REPEATS_MIN 3
@@ -83,20 +84,7 @@ file_log_function (const gchar * log_domain, const gchar *function,
static inline guint32
rspamd_log_calculate_cksum (const gchar *message, size_t mlen)
{
- const gchar *bp = message;
- const gchar *be = bp + mlen;
- guint32 hval = 0;
-
- while (bp < be) {
- hval +=
- (hval <<
- 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
- hval ^= (guint32) * bp++;
- }
-
- /* return our new hash value */
- return hval;
-
+ return XXH32 (message, mlen, 0xdeadbeef);
}
/*
diff --git a/src/rdns b/src/rdns
-Subproject a21b4c0afc2c4bd7a2a16fbd6ba05033c926f6c
+Subproject 8d80ac78cf6436c077804dd0972866a5bd55732