From 4928f5fcb73f9c27c900856595e6a6caac4315b2 Mon Sep 17 00:00:00 2001 From: leslie Date: Sun, 26 Apr 2009 19:43:22 +0200 Subject: [PATCH] change msg cache hash algo --- system.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system.c b/system.c index 9e5a172..29ae0ac 100644 --- a/system.c +++ b/system.c @@ -23,6 +23,8 @@ #include +#include + #include "sc.h" #include "scsetup.h" #include "system.h" @@ -498,7 +500,8 @@ struct Cache *cMsgCache::FindMsg(int crc) // >0 - msg not cached, queue id int cMsgCache::Get(const unsigned char *msg, int len, unsigned char *store) { - int crc=crc32_le(0,msg,len); + unsigned char md[16]; + int crc=crc32_le(0,MD5(msg,len,md),16); cMutexLock lock(&mutex); if(!caches || (storeSize>0 && !stores)) return -1; // sanity struct Cache *s; -- 2.39.5