[gnome-logs] Use GError while calling gl_journal_get_data
- From: Jonathan Kang <jonathankang src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs] Use GError while calling gl_journal_get_data
- Date: Wed, 24 Feb 2016 09:55:42 +0000 (UTC)
commit ce3b9a7bd27c599f2d7a918c734e34d9bd5e14bc
Author: Jonathan Kang <jonathan121537 gmail com>
Date: Wed Feb 24 17:52:21 2016 +0800
Use GError while calling gl_journal_get_data
src/gl-journal.c | 22 +++++++++++++++++-----
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]