Module: sip-router
Branch: master
Commit: a6a01a9e8345f1bbec02715e10e31b540b7f1368
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a6a01a9…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Fri Apr 2 15:03:09 2010 +0300
lib/kcore/km_crc.c Fixed wrong computation of crc32
The final result was not bitwise complemented, yeilding an incorrect result
---
lib/kcore/km_crc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/kcore/km_crc.c b/lib/kcore/km_crc.c
index 0950f4e..95ca201 100644
--- a/lib/kcore/km_crc.c
+++ b/lib/kcore/km_crc.c
@@ -25,6 +25,6 @@ void crc32_uint (str *source_string, unsigned int *hash_ret)
hash = crc_32_tab[((unsigned char)hash) ^ *data] ^ (hash >> 8);
}
- *hash_ret = hash;
+ *hash_ret = ~hash;
}