/cpw/tomkiewicz/gg11: cd43030813f6: Silence a warning

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Thu Nov 15 08:08:42 EST 2012


Changeset: cd43030813f6d09e073556a07597ef938e842a49
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-11-15 14:08 +0100
Branch:	 default
URL: http://hg.pidgin.im/cpw/tomkiewicz/gg11/rev/cd43030813f6

Description:

Silence a warning

diffstat:

 libpurple/protocols/gg/libgadu-events.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (27 lines):

diff --git a/libpurple/protocols/gg/libgadu-events.c b/libpurple/protocols/gg/libgadu-events.c
--- a/libpurple/protocols/gg/libgadu-events.c
+++ b/libpurple/protocols/gg/libgadu-events.c
@@ -85,13 +85,21 @@ void ggp_events_user_data(PurpleConnecti
 
 void ggp_events_json(PurpleConnection *gc, struct gg_event_json_event *ev)
 {
+	static const gchar *ignored_events[] = {
+		"edisc/scope_files_changed",
+		"notifications/state",
+		NULL
+	};
+	const gchar **it;
+
 	if (g_strcmp0("edisc/send_ticket_changed", ev->type) == 0) {
 		ggp_edisc_xfer_ticket_changed(gc, ev->data);
 		return;
 	}
 
-	if (g_strcmp0("edisc/scope_files_changed", ev->type) == 0) {
-		return;
+	for (it = ignored_events; *it != NULL; it++) {
+		if (g_strcmp0(*it, ev->type) == 0)
+			return;
 	}
 
 	if (purple_debug_is_unsafe() && purple_debug_is_verbose())



More information about the Commits mailing list