From 826b30be20a63012b1d4c90d2876945900ae76f5 Mon Sep 17 00:00:00 2001 From: Mark Doffman Date: Fri, 21 Aug 2009 12:10:56 +0100 Subject: [PATCH] 2009-08-21 Mark Doffman This patch removes two unused variable declarations and renames emit() to emit_update_applications(), removing the signal name argument. Fix provided by: Mario Lang --- registryd/registry.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/registryd/registry.c b/registryd/registry.c index 1efb907..5d7b807 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -54,7 +54,7 @@ spi_registry_init (SpiRegistry *registry) /*---------------------------------------------------------------------------*/ -static void emit(SpiRegistry *reg, const char *name, guint sigtype, const char *app) +static void emit_update_applications(SpiRegistry *reg, guint sigtype, const char *app) { DBusMessage *msg = NULL; DBusError error; @@ -62,7 +62,8 @@ static void emit(SpiRegistry *reg, const char *name, guint sigtype, const char * dbus_error_init (&error); if ((msg = dbus_message_new_signal (SPI_DBUS_PATH_REGISTRY, - SPI_DBUS_INTERFACE_REGISTRY, name))) { + SPI_DBUS_INTERFACE_REGISTRY, + "updateApplications"))) { dbus_message_append_args(msg, DBUS_TYPE_INT32, &sigtype, DBUS_TYPE_STRING, &app, DBUS_TYPE_INVALID); @@ -136,23 +137,19 @@ seq_remove_string (GSequence *seq, gchar *str) static void add_application (DBusConnection *bus, SpiRegistry *reg, gchar *app) { - guint add = REGISTRY_APPLICATION_ADD; - if (seq_add_string (reg->apps, app)) { - emit (reg, "updateApplications", REGISTRY_APPLICATION_ADD, app); + emit_update_applications (reg, REGISTRY_APPLICATION_ADD, app); } } static void remove_application (DBusConnection *bus, SpiRegistry *reg, gchar *app) { - guint remove = REGISTRY_APPLICATION_REMOVE; - if (seq_remove_string (reg->apps, app)) { /*TODO spi_remove_device_listeners (registry->de_controller, old);*/ - emit (reg, "updateApplications", REGISTRY_APPLICATION_REMOVE, app); + emit_update_applications (reg, REGISTRY_APPLICATION_REMOVE, app); } } -- 2.7.4