summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Kang <jonathan121537@gmail.com>2016-02-24 17:52:21 +0800
committerJonathan Kang <jonathan121537@gmail.com>2016-02-24 17:52:21 +0800
commitce3b9a7bd27c599f2d7a918c734e34d9bd5e14bc (patch)
tree662b711f8cd9ba34fec33d6652fabb6c8266ccc5 /src
parent2bb9e3cc2c31865d6ffca21ebc486e8a79bcde28 (diff)
downloadgnome-logs-ce3b9a7bd27c599f2d7a918c734e34d9bd5e14bc.tar.gz
Use GError while calling gl_journal_get_data
Diffstat (limited to 'src')
-rw-r--r--src/gl-journal.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gl-journal.c b/src/gl-journal.c
index 2b45ab0..0b56e46 100644
--- a/src/gl-journal.c
+++ b/src/gl-journal.c
@@ -182,7 +182,13 @@ gl_journal_get_boots (GlJournal *journal)
g_strerror (-r));
}
- id = gl_journal_get_data (journal, "_BOOT_ID", NULL);
+ id = gl_journal_get_data (journal, "_BOOT_ID", &error);
+ if (error != NULL)
+ {
+ g_debug ("%s", error->message);
+ g_clear_error (&error);
+ }
+
boot_match = g_strconcat ("_BOOT_ID=", id, NULL);
boot_id.boot_match = boot_match;
g_free (id);
@@ -413,7 +419,7 @@ _gl_journal_query_entry (GlJournal *self)
goto out;
}
- entry->message = gl_journal_get_data (self, "MESSAGE", NULL);
+ entry->message = gl_journal_get_data (self, "MESSAGE", &error);
if (error != NULL)
{
@@ -426,7 +432,7 @@ _gl_journal_query_entry (GlJournal *self)
goto out;
}
- priority = gl_journal_get_data (self, "PRIORITY", NULL);
+ priority = gl_journal_get_data (self, "PRIORITY", &error);
if (error != NULL)
{
@@ -452,7 +458,7 @@ _gl_journal_query_entry (GlJournal *self)
g_clear_error (&error);
}
- entry->kernel_device = gl_journal_get_data (self, "_KERNEL_DEVICE", NULL);
+ entry->kernel_device = gl_journal_get_data (self, "_KERNEL_DEVICE", &error);
if (error != NULL)
{
@@ -460,7 +466,13 @@ _gl_journal_query_entry (GlJournal *self)
g_clear_error (&error);
}
- entry->audit_session = gl_journal_get_data (self, "_AUDIT_SESSION", NULL);
+ entry->audit_session = gl_journal_get_data (self, "_AUDIT_SESSION", &error);
+
+ if (error != NULL)
+ {
+ g_debug ("%s", error->message);
+ g_clear_error (&error);
+ }
entry->transport = gl_journal_get_data (self, "_TRANSPORT", &error);