summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/HashFunction.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/HashFunction.cc b/lib/HashFunction.cc
index 9f165e4..c2cf344 100644
--- a/lib/HashFunction.cc
+++ b/lib/HashFunction.cc
@@ -40,16 +40,14 @@ void HashFunction::Update(const unsigned char * data, size_t len) {
update(data, len);
}
-#define BLKSIZE 1024
+#define BLKSIZE 16384
void HashFunction::Update(Handle * h, ssize_t size) {
- static Uint8 blk[BLKSIZE];
+ Uint8 blk[BLKSIZE];
long r;
if (size < 0)
size = h->GetSize();
- LOCK;
-
while (size) {
if ((size > BLKSIZE) || (size < 0)) {
r = h->read(blk, BLKSIZE);
@@ -65,8 +63,6 @@ void HashFunction::Update(Handle * h, ssize_t size) {
if (size > 0)
size -= r;
}
-
- UNLOCK;
}
String HashFunction::Finish() {