/soc/2015/igor.gajowiak/chatlog: 892ba5c9f765: A fix a return type.

Igor Gajowiak igor.gajowiak at gmail.com
Thu Jul 16 14:53:42 EDT 2015


Changeset: 892ba5c9f7651d8701f5d9bd6827c30a7f4b097d
Author:	 Igor Gajowiak <igor.gajowiak at gmail.com>
Date:	 2015-07-16 20:53 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/igor.gajowiak/chatlog/rev/892ba5c9f765

Description:

A fix a return type.

diffstat:

 libpurple/plugins/log/logsqlite.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (34 lines):

diff --git a/libpurple/plugins/log/logsqlite.c b/libpurple/plugins/log/logsqlite.c
--- a/libpurple/plugins/log/logsqlite.c
+++ b/libpurple/plugins/log/logsqlite.c
@@ -211,26 +211,22 @@ sqlite_log_log_im(PurpleAccount *account
 	return TRUE;
 }
 
-static GError*
+static gboolean
 sqlite_log_mark_as_seen(PurpleMessage *message)
 {
 	gpointer id = g_object_get_data(G_OBJECT(message), "sqlitelog-msg-id");
 
 	if(id == NULL)
-		return g_error_new(purple_genericlog_error_domain(),
-			PURPLE_GENERICLOG_ERROR_BACKENDFAIL,
-			"SQLITE uninitialized dynamic property (sqlitelog-msg-id)");
+		return FALSE;
 
 	char *sql_statement = g_strdup_printf("UPDATE Messages SET Read = 0 "
 										"WHERE Id = %d;", GPOINTER_TO_INT(id));
 
 	if(sqlite3_exec(sqlite_log_db, sql_statement, NULL, NULL, NULL) != SQLITE_OK) {
 		g_free(sql_statement);
-		return g_error_new(purple_genericlog_error_domain(),
-			PURPLE_GENERICLOG_ERROR_BACKENDFAIL,
-			"SQLITE database marking as read failed");
+		return FALSE;
 	}
-	return NULL;
+	return TRUE;
 }
 
 static int



More information about the Commits mailing list