diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-06-27 12:30:16 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-06-27 12:30:16 -0500 |
commit | 104bcd689ac461a358214cd4b55f44fef67500ff (patch) | |
tree | 375b58f28e7d68e3ab72d75914f14d0915c27759 /libindicator | |
parent | 7bd45482c87a3c89569d857707240ecbb6a1f5f9 (diff) | |
download | libayatana-indicator-104bcd689ac461a358214cd4b55f44fef67500ff.tar.gz libayatana-indicator-104bcd689ac461a358214cd4b55f44fef67500ff.tar.bz2 libayatana-indicator-104bcd689ac461a358214cd4b55f44fef67500ff.zip |
in indicator_ng_service_started(), the result's variant type should be parsed as '(u)' rather than 'u'
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-ng.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c index b58a6c3..b372e2e 100644 --- a/libindicator/indicator-ng.c +++ b/libindicator/indicator-ng.c @@ -383,15 +383,16 @@ indicator_ng_service_appeared (GDBusConnection *connection, static void indicator_ng_service_started (GObject *source_object, - GAsyncResult *result, + GAsyncResult *res, gpointer user_data) { IndicatorNg *self = user_data; GError *error = NULL; - GVariant *reply; + GVariant *result; + guint32 start_service_reply; - reply = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), result, &error); - if (!reply) + result = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source_object), res, &error); + if (!result) { g_warning ("Could not activate service '%s': %s", self->name, error->message); indicator_object_set_visible (INDICATOR_OBJECT (self), FALSE); @@ -399,7 +400,10 @@ indicator_ng_service_started (GObject *source_object, return; } - switch (g_variant_get_uint32 (reply)) + start_service_reply = 0; + g_variant_get (result, "(u)", &start_service_reply); + + switch (start_service_reply) { case 1: /* DBUS_START_REPLY_SUCCESS */ break; @@ -412,7 +416,7 @@ indicator_ng_service_started (GObject *source_object, g_assert_not_reached (); } - g_variant_unref (reply); + g_variant_unref (result); } static void |