[gnome-logs] Do not return NULL if error fetching PRIORITY
- From: Jonathan Kang <jonathankang src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs] Do not return NULL if error fetching PRIORITY
- Date: Thu, 25 Feb 2016 09:55:19 +0000 (UTC)
commit 9600be1f3911f994d40f5e0de78791c842a42978
Author: Jonathan Kang <jonathan121537 gmail com>
Date: Thu Feb 25 17:43:23 2016 +0800
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
src/gl-journal.c | 11 +++--------
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]