chiark / gitweb /
journal: fix hash table lookup logic
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Dec 2011 21:58:20 +0000 (22:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Dec 2011 21:58:20 +0000 (22:58 +0100)
src/journal/journal-file.c
src/journal/sd-journal.h

index 4a006d3bf3510b282b87678bf0cfa93e3bc5aeed..80775e1acf940f46a1f7a44125c950c4ae21c076 100644 (file)
@@ -595,7 +595,7 @@ int journal_file_find_data_object_with_hash(
                         return r;
 
                 if (le64toh(o->data.hash) != hash)
-                        return -EBADMSG;
+                        goto next;
 
                 if (o->object.flags & OBJECT_COMPRESSED) {
 #ifdef HAVE_XZ
@@ -637,6 +637,7 @@ int journal_file_find_data_object_with_hash(
                         return 1;
                 }
 
+        next:
                 p = le64toh(o->data.next_hash_offset);
         }
 
index 7e2ef1532798ca03d56023de8200b7662e2c2a95..9872e9c29c2f2717ae1344c59aca6125d2d26275 100644 (file)
@@ -35,7 +35,6 @@
  *   - implement audit gateway
  *   - extend hash tables table as we go
  *   - accelerate looking for "all hostnames" and suchlike.
- *   - throttling
  *   - cryptographic hash
  *   - never access beyond fle size check
  *   - OR of matches is borked...