[rhythmbox] mpris: don't return 'not supported' errors for method calls we've handled
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] mpris: don't return 'not supported' errors for method calls we've handled
- Date: Thu, 19 Aug 2010 10:07:55 +0000 (UTC)
commit 56c5be508422e4480d4071dfe98c6cd6d9505241
Author: Jonathan Matthew <jonathan d14n org>
Date: Thu Aug 19 20:07:27 2010 +1000
mpris: don't return 'not supported' errors for method calls we've handled
plugins/mpris/rb-mpris-plugin.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plugins/mpris/rb-mpris-plugin.c b/plugins/mpris/rb-mpris-plugin.c
index 4e54804..645201a 100644
--- a/plugins/mpris/rb-mpris-plugin.c
+++ b/plugins/mpris/rb-mpris-plugin.c
@@ -187,14 +187,14 @@ handle_root_method_call (GDBusConnection *connection,
} else if (g_strcmp0 (method_name, "Quit") == 0) {
rb_shell_quit (plugin->shell, NULL);
g_dbus_method_invocation_return_value (invocation, NULL);
+ } else {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_NOT_SUPPORTED,
+ "Method %s.%s not supported",
+ interface_name,
+ method_name);
}
-
- g_dbus_method_invocation_return_error (invocation,
- G_DBUS_ERROR,
- G_DBUS_ERROR_NOT_SUPPORTED,
- "Method %s.%s not supported",
- interface_name,
- method_name);
}
static GVariant *
@@ -609,14 +609,14 @@ handle_player_method_call (GDBusConnection *connection,
g_variant_get (parameters, "(&s)", &uri);
ret = rb_shell_load_uri (plugin->shell, uri, TRUE, &error);
handle_result (invocation, ret, error);
+ } else {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_NOT_SUPPORTED,
+ "Method %s.%s not supported",
+ interface_name,
+ method_name);
}
-
- g_dbus_method_invocation_return_error (invocation,
- G_DBUS_ERROR,
- G_DBUS_ERROR_NOT_SUPPORTED,
- "Method %s.%s not supported",
- interface_name,
- method_name);
}
static GVariant *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]