summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-13 17:06:04 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-13 17:06:04 +0200
commit5996c7c295e073ce21d41305169132c8aa993ad0 (patch)
treeba64ad31f8aadc652ac74939106420237c688641 /src/journal/journal-file.c
parentc4164442defa56dfa92a6b0fa5d49d8876e0ebb7 (diff)
journald: don't reposition window if we don't have to
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 8016852b91..e55162ab2c 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -775,18 +775,18 @@ static int journal_file_append_data(
if (r < 0)
return r;
-#ifdef HAVE_GCRYPT
- r = journal_file_hmac_put_object(f, OBJECT_DATA, p);
- if (r < 0)
- return r;
-#endif
-
/* The linking might have altered the window, so let's
* refresh our pointer */
r = journal_file_move_to_object(f, OBJECT_DATA, p, &o);
if (r < 0)
return r;
+#ifdef HAVE_GCRYPT
+ r = journal_file_hmac_put_object(f, OBJECT_DATA, o, p);
+ if (r < 0)
+ return r;
+#endif
+
if (ret)
*ret = o;
@@ -866,7 +866,7 @@ static int link_entry_into_array(JournalFile *f,
return r;
#ifdef HAVE_GCRYPT
- r = journal_file_hmac_put_object(f, OBJECT_ENTRY_ARRAY, q);
+ r = journal_file_hmac_put_object(f, OBJECT_ENTRY_ARRAY, o, q);
if (r < 0)
return r;
#endif
@@ -1012,7 +1012,7 @@ static int journal_file_append_entry_internal(
o->entry.boot_id = f->header->boot_id;
#ifdef HAVE_GCRYPT
- r = journal_file_hmac_put_object(f, OBJECT_ENTRY, np);
+ r = journal_file_hmac_put_object(f, OBJECT_ENTRY, o, np);
if (r < 0)
return r;
#endif