From 02ad53584d988bb54f0e2f1b7eaf3e65b71a64ae Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 12 Jul 2019 11:35:55 +0200 Subject: [PATCH 1/2] daemon: properly report error in error case Currently, in method_list_games (`ListGames` on the bus), when sd_bus_message_append fails, we break the loop but then we were not reporting the error (contained in r) back to call. --- daemon/gamemode-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/gamemode-dbus.c b/daemon/gamemode-dbus.c index f321d8d..9ba6246 100644 --- a/daemon/gamemode-dbus.c +++ b/daemon/gamemode-dbus.c @@ -257,7 +257,7 @@ static int method_list_games(sd_bus_message *m, void *userdata, free(clients); if (r < 0) - return 0; + return r; r = sd_bus_message_close_container(reply); if (r < 0) From 9075829526b197ef0a6cfe820059474e7194274c Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 12 Jul 2019 17:01:01 +0200 Subject: [PATCH 2/2] daemon: fix typo in Game.Executable dbus property Fix spelling for the 'Executable' property in the interface com.feralinteractive.GameMode.Game. --- daemon/gamemode-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/gamemode-dbus.c b/daemon/gamemode-dbus.c index 9ba6246..fa28274 100644 --- a/daemon/gamemode-dbus.c +++ b/daemon/gamemode-dbus.c @@ -468,7 +468,7 @@ static const sd_bus_vtable game_vtable[] = { SD_BUS_VTABLE_START(0), SD_BUS_PROPERTY("ProcessId", "i", game_object_get_process_id, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), - SD_BUS_PROPERTY("Exectuable", "s", game_object_get_executable, 0, + SD_BUS_PROPERTY("Executable", "s", game_object_get_executable, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_VTABLE_END };