From: Jaroslav Kysela Date: Wed, 17 Jan 2018 17:00:41 +0000 (+0100) Subject: use tvheadend_is_running() instead direct tvheadend_running variable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45279684f180ce367fc0a266de8f67e2165ef624;p=thirdparty%2Ftvheadend.git use tvheadend_is_running() instead direct tvheadend_running variable --- diff --git a/src/dvr/dvr_inotify.c b/src/dvr/dvr_inotify.c index 979fb0289..17456d5a3 100644 --- a/src/dvr/dvr_inotify.c +++ b/src/dvr/dvr_inotify.c @@ -379,7 +379,7 @@ void* _dvr_inotify_thread ( void *p ) int fromfd; int cookie; - while (atomic_get(&tvheadend_running)) { + while (tvheadend_is_running()) { /* Read events */ fromfd = 0; diff --git a/src/fsmonitor.c b/src/fsmonitor.c index f5a8ef7eb..557c2c2fb 100644 --- a/src/fsmonitor.c +++ b/src/fsmonitor.c @@ -53,7 +53,7 @@ fsmonitor_thread ( void* p ) fsmonitor_link_t *fml; fsmonitor_t *fsm; - while (atomic_get(&tvheadend_running)) { + while (tvheadend_is_running()) { fd = atomic_get(&fsmonitor_fd); if (fd < 0) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_ca.c b/src/input/mpegts/linuxdvb/linuxdvb_ca.c index c70dba3a5..c3e1ee2df 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_ca.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_ca.c @@ -294,7 +294,7 @@ linuxdvb_ca_thread ( void *aux ) poll = tvhpoll_create(evsize + 1); tm = mclk(); waitms = 250; - while (tvheadend_running && !quit) { + while (tvheadend_is_running() && !quit) { evp = ev; evp->fd = linuxdvb_ca_pipe.rd; evp->events = TVHPOLL_IN; diff --git a/src/main.c b/src/main.c index 84b8ea1b2..9969034a9 100644 --- a/src/main.c +++ b/src/main.c @@ -140,7 +140,7 @@ static cmdline_opt_t* cmdline_opt_find /* * Globals */ -int tvheadend_running; +int tvheadend_running; /* do not use directly: tvheadend_is_running() */ int tvheadend_webui_port; int tvheadend_webui_debug; int tvheadend_htsp_port;