]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http: fix locking for options cmd, fixes #3950
authorJaroslav Kysela <perex@perex.cz>
Thu, 25 Aug 2016 12:51:22 +0000 (14:51 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 25 Aug 2016 12:51:22 +0000 (14:51 +0200)
src/http.c

index 81a47e5d20958211ba701d2bfdbbe894cf69cd48..042c41d0a2ae49844628f995ac202fe79b1b69e3 100644 (file)
@@ -967,8 +967,10 @@ dump_request(http_connection_t *hc)
 static int
 http_cmd_options(http_connection_t *hc)
 {
+  pthread_mutex_lock(&hc->hc_fd_lock);
   http_send_header(hc, HTTP_STATUS_OK, NULL, INT64_MIN,
                   NULL, NULL, -1, 0, NULL, NULL);
+  pthread_mutex_unlock(&hc->hc_fd_lock);
   return 0;
 }