summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-upload-journal.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-01 09:09:35 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 22:23:48 -0400
commit722b6795655149a68277b3cffeba711e1d440e5a (patch)
treefe90567fd0d85e994cb65ce2cf996330ddb2f44e /src/journal-remote/journal-upload-journal.c
parenteacbb4d33e2bb5c54311544851140efe3dd0f774 (diff)
journal-upload: make state persistent
Diffstat (limited to 'src/journal-remote/journal-upload-journal.c')
-rw-r--r--src/journal-remote/journal-upload-journal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/journal-remote/journal-upload-journal.c b/src/journal-remote/journal-upload-journal.c
index a3be1bf8e5..1cd52db2c1 100644
--- a/src/journal-remote/journal-upload-journal.c
+++ b/src/journal-remote/journal-upload-journal.c
@@ -21,17 +21,17 @@ static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
switch(u->entry_state) {
case ENTRY_CURSOR: {
- free(u->last_cursor);
- u->last_cursor = NULL;
+ free(u->current_cursor);
+ u->current_cursor = NULL;
- r = sd_journal_get_cursor(u->journal, &u->last_cursor);
+ r = sd_journal_get_cursor(u->journal, &u->current_cursor);
if (r < 0) {
log_error("Failed to get cursor: %s", strerror(-r));
return r;
}
r = snprintf(buf + pos, size - pos,
- "__CURSOR=%s\n", u->last_cursor);
+ "__CURSOR=%s\n", u->current_cursor);
if (pos + r > size)
/* not enough space */
return pos;
@@ -282,7 +282,7 @@ static size_t journal_input_callback(void *buf, size_t size, size_t nmemb, void
break;
log_debug("Entry %zu (%s) has been uploaded.",
- u->entries_sent, u->last_cursor);
+ u->entries_sent, u->current_cursor);
}
return filled;