From fd69ac16827822f0ca6f994ca0fe7f1e3665b61b Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 25 Sep 2017 08:30:13 +0200 Subject: [PATCH] htsp: move open syscall outside global_lock, issue #4624 --- src/htsp_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/htsp_server.c b/src/htsp_server.c index 69a032694..6e1e71aa6 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -718,8 +718,10 @@ htsp_file_open(htsp_connection_t *htsp, const char *path, int fd, dvr_entry_t *d struct stat st; if (fd <= 0) { + pthread_mutex_unlock(&global_lock); fd = tvh_open(path, O_RDONLY, 0); tvhdebug(LS_HTSP, "Opening file %s -- %s", path, fd < 0 ? strerror(errno) : "OK"); + pthread_mutex_lock(&global_lock); if(fd == -1) return htsp_error(htsp, N_("Unable to open file")); } -- 2.47.2