From d4fdd9e3b486f48fc12e78032f29015220998b4c Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 9 Feb 2019 16:13:11 +0000 Subject: [PATCH] Correct internal name for query_status_for --- daemon/dbus_messaging.c | 8 ++++---- daemon/gamemode.c | 2 +- daemon/gamemode.h | 2 +- lib/client_impl.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/daemon/dbus_messaging.c b/daemon/dbus_messaging.c index d71ff47..c74435e 100644 --- a/daemon/dbus_messaging.c +++ b/daemon/dbus_messaging.c @@ -165,8 +165,8 @@ static int method_unregister_game_by_pid(sd_bus_message *m, void *userdata, /** * Handles the QueryStatus D-BUS Method */ -static int method_query_status_for(sd_bus_message *m, void *userdata, - __attribute__((unused)) sd_bus_error *ret_error) +static int method_query_status_by_pid(sd_bus_message *m, void *userdata, + __attribute__((unused)) sd_bus_error *ret_error) { int callerpid = 0; int gamepid = 0; @@ -178,7 +178,7 @@ static int method_query_status_for(sd_bus_message *m, void *userdata, return ret; } - int status = game_mode_context_query_status_for(context, (pid_t)callerpid, (pid_t)gamepid); + int status = game_mode_context_query_status_by_pid(context, (pid_t)callerpid, (pid_t)gamepid); return sd_bus_reply_method_return(m, "i", status); } @@ -195,7 +195,7 @@ static const sd_bus_vtable gamemode_vtable[] = SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD("UnregisterGameByPID", "ii", "i", method_unregister_game_by_pid, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD("QueryStatusFor", "ii", "i", method_query_status_for, + SD_BUS_METHOD("QueryStatusByPID", "ii", "i", method_query_status_by_pid, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_VTABLE_END }; diff --git a/daemon/gamemode.c b/daemon/gamemode.c index 016f632..ea1de89 100644 --- a/daemon/gamemode.c +++ b/daemon/gamemode.c @@ -571,7 +571,7 @@ error_cleanup: /** * Request status on behalf of caller */ -int game_mode_context_query_status_for(GameModeContext *self, pid_t callerpid, pid_t gamepid) +int game_mode_context_query_status_by_pid(GameModeContext *self, pid_t callerpid, pid_t gamepid) { int status = 0; diff --git a/daemon/gamemode.h b/daemon/gamemode.h index 65df3c1..dca0652 100644 --- a/daemon/gamemode.h +++ b/daemon/gamemode.h @@ -120,7 +120,7 @@ int game_mode_context_unregister_by_pid(GameModeContext *self, pid_t callerpid, * 2 if gamemode is active and the client is registered * -2 if this supervisor was rejected */ -int game_mode_context_query_status_for(GameModeContext *self, pid_t callerpid, pid_t gamepid); +int game_mode_context_query_status_by_pid(GameModeContext *self, pid_t callerpid, pid_t gamepid); /** * Query the config of a gamemode context diff --git a/lib/client_impl.c b/lib/client_impl.c index 051ed0c..f09a0f7 100644 --- a/lib/client_impl.c +++ b/lib/client_impl.c @@ -125,8 +125,8 @@ extern int real_gamemode_register_end_for(pid_t pid) return gamemode_request("UnregisterGameByPID", pid); } -// Wrapper to call QueryStatusFor +// Wrapper to call QueryStatusByPID extern int real_gamemode_query_status_for(pid_t pid) { - return gamemode_request("QueryStatusFor", pid); + return gamemode_request("QueryStatusByPID", pid); }