summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Kang <jonathan121537@gmail.com>2016-02-25 17:43:23 +0800
committerJonathan Kang <jonathan121537@gmail.com>2016-02-25 17:52:02 +0800
commit9600be1f3911f994d40f5e0de78791c842a42978 (patch)
tree130fa721dd9ce65ec22fe3b3e62a1dc4a029a0df /src
parent9509f266c5109b1a796c10fd03c09b28e92222f5 (diff)
downloadgnome-logs-9600be1f3911f994d40f5e0de78791c842a42978.tar.gz
Do not return NULL if error fetching PRIORITY
Use g_debug instead of g_warning as debug information for fetching PRIORITY field. And do not return NULL as the return value of _gl_journal_query_entry while error fetching PRIORITY field. https://bugzilla.gnome.org/show_bug.cgi?id=762665
Diffstat (limited to 'src')
-rw-r--r--src/gl-journal.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gl-journal.c b/src/gl-journal.c
index 9afb1fe..93ac93c 100644
--- a/src/gl-journal.c
+++ b/src/gl-journal.c
@@ -437,15 +437,10 @@ _gl_journal_query_entry (GlJournal *self)
if (error != NULL)
{
- g_warning ("%s", error->message);
+ /* Some entries do not have PRIORITY field, so use g_debug instead
+ * of g_warning*/
+ g_debug ("%s", error->message);
g_clear_error (&error);
- free (entry->cursor);
- entry->cursor = NULL;
- free (entry->catalog);
- entry->catalog = NULL;
- g_free (entry->message);
- entry->message = NULL;
- goto out;
}
entry->priority = priority ? atoi (priority) : LOG_INFO;