From 9bda301eb4d8aa75d435f24146c3a66ab74cafea Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 26 Mar 2020 23:40:25 +0100 Subject: command: use client IDs for hooks Removes weird potential race conditions when a client is removed and a new one with the same name is created. --- player/command.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'player/command.h') diff --git a/player/command.h b/player/command.h index 1b3154394a..17e0726b0b 100644 --- a/player/command.h +++ b/player/command.h @@ -105,9 +105,9 @@ enum { bool mp_hook_test_completion(struct MPContext *mpctx, char *type); void mp_hook_start(struct MPContext *mpctx, char *type); -int mp_hook_continue(struct MPContext *mpctx, char *client, uint64_t id); -void mp_hook_add(struct MPContext *mpctx, const char *client, const char *name, - uint64_t user_id, int pri); +int mp_hook_continue(struct MPContext *mpctx, int64_t client_id, uint64_t id); +void mp_hook_add(struct MPContext *mpctx, char *client, int64_t client_id, + const char *name, uint64_t user_id, int pri); void mark_seek(struct MPContext *mpctx); -- cgit v1.2.3