]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
msg queue: wake thread on new message
authorLuis Alves <ljalvs@gmail.com>
Mon, 29 Oct 2018 18:21:05 +0000 (18:21 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 29 Oct 2018 19:10:53 +0000 (20:10 +0100)
src/profile.c

index 00570b9fa55cfcaa857cafb85d1ffa1e5bda0620..4f710b07d15809f097998c12d1e2866378f897ac 100644 (file)
@@ -728,9 +728,8 @@ profile_input_queue(void *opaque, streaming_message_t *sm)
   psm->psm_sm = sm;
   pthread_mutex_lock(&prsh->prsh_queue_mutex);
   if (prsh->prsh_queue_run) {
-    if (TAILQ_FIRST(&prsh->prsh_queue))
-      tvh_cond_signal(&prsh->prsh_queue_cond, 0);
     TAILQ_INSERT_TAIL(&prsh->prsh_queue, psm, psm_link);
+    tvh_cond_signal(&prsh->prsh_queue_cond, 0);
   } else {
     streaming_msg_free(sm);
     free(psm);