mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
nhttp: enable threading
This is ported from neutrino-mp and contains code by martii and seife
from following commits:
20d3031b8bb47b5af79bf10c385e3564fe5c26dc
93d01c1987726c6ab344f69f799df03d5af8fe7a
363633dc1b9a508e244c7e1e51f6c1bbe699961c
c3e1310a2f727e26ce11669e3aeae78305f87049
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7589a3a9e0
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-08-19 (Tue, 19 Aug 2014)
Origin message was:
------------------
- nhttp: enable threading
This is ported from neutrino-mp and contains code by martii and seife
from following commits:
20d3031b8bb47b5af79bf10c385e3564fe5c26dc
93d01c1987726c6ab344f69f799df03d5af8fe7a
363633dc1b9a508e244c7e1e51f6c1bbe699961c
c3e1310a2f727e26ce11669e3aeae78305f87049
------------------
This commit was generated by Migit
This commit is contained in:
@@ -144,8 +144,6 @@ void * timerd_main_thread(void *data);
|
||||
static bool timerd_thread_started = false;
|
||||
|
||||
void * nhttpd_main_thread(void *data);
|
||||
static pthread_t nhttpd_thread ;
|
||||
static bool nhttpd_thread_started = false;
|
||||
|
||||
//#define DISABLE_SECTIONSD
|
||||
|
||||
@@ -1955,8 +1953,9 @@ TIMER_START();
|
||||
|
||||
dvbsub_init();
|
||||
|
||||
pthread_create (&nhttpd_thread, NULL, nhttpd_main_thread, (void *) NULL);
|
||||
nhttpd_thread_started = true;
|
||||
pthread_t nhttpd_thread;
|
||||
if (!pthread_create (&nhttpd_thread, NULL, nhttpd_main_thread, (void *) NULL))
|
||||
pthread_detach (nhttpd_thread);
|
||||
|
||||
CStreamManager::getInstance()->Start();
|
||||
|
||||
@@ -3793,12 +3792,6 @@ void stop_daemons(bool stopall, bool for_flash)
|
||||
delete g_Radiotext;
|
||||
g_Radiotext = NULL;
|
||||
}
|
||||
printf("httpd shutdown\n");
|
||||
if (nhttpd_thread_started) {
|
||||
pthread_cancel(nhttpd_thread);
|
||||
pthread_join(nhttpd_thread, NULL);
|
||||
}
|
||||
printf("httpd shutdown done\n");
|
||||
printf("streaming shutdown\n");
|
||||
CStreamManager::getInstance()->Stop();
|
||||
printf("streaming shutdown done\n");
|
||||
|
Reference in New Issue
Block a user