summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-26 23:58:09 +0100
committerwm4 <wm4@nowhere>2020-03-26 23:59:44 +0100
commit1a720377203f7cee2ab949c5aa2bc9e0a2a7e0f2 (patch)
treebc2028b3823c06d59091797536c32623ebc555a8 /player/client.c
parent9bda301eb4d8aa75d435f24146c3a66ab74cafea (diff)
downloadmpv-1a720377203f7cee2ab949c5aa2bc9e0a2a7e0f2.tar.bz2
mpv-1a720377203f7cee2ab949c5aa2bc9e0a2a7e0f2.tar.xz
scripting: remove race condition when toggling internal scripts
Scripts such as the OSC can be loaded and unloaded at runtime by toggling the option that enables them. (It even works, although normally it's only used to control initial loading.) Unloading was racy because it used the client name; fix this. The load-script change is an accidental feature. And probably useless.
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/player/client.c b/player/client.c
index a72cb0125f..d2a94cc0c9 100644
--- a/player/client.c
+++ b/player/client.c
@@ -254,14 +254,6 @@ static struct mpv_handle *find_client(struct mp_client_api *clients,
return NULL;
}
-bool mp_client_exists(struct MPContext *mpctx, const char *client_name)
-{
- pthread_mutex_lock(&mpctx->clients->lock);
- bool r = find_client(mpctx->clients, client_name);
- pthread_mutex_unlock(&mpctx->clients->lock);
- return r;
-}
-
bool mp_client_id_exists(struct MPContext *mpctx, int64_t id)
{
pthread_mutex_lock(&mpctx->clients->lock);