From: leslie <unknown>
Date: Sun, 26 Apr 2009 17:43:22 +0000 (+0200)
Subject: change msg cache hash algo
X-Git-Tag: 0.9.2~40
X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=4928f5fcb73f9c27c900856595e6a6caac4315b2;p=sasc-ng.git

change msg cache hash algo
---

diff --git a/system.c b/system.c
index 9e5a172..29ae0ac 100644
--- a/system.c
+++ b/system.c
@@ -23,6 +23,8 @@
 
 #include <vdr/tools.h>
 
+#include <openssl/md5.h>
+
 #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;