enum {
OPT_STR,
OPT_INT,
- OPT_BOOL,
+ OPT_BOOL,
OPT_STR_LIST,
} type;
void *param;
free(desc);
}
}
- printf("%s",
+ printf("%s",
_("\n"
"For more information please visit the Tvheadend website:\n"
"https://tvheadend.org\n"));
next = now + sec2mono(3600);
while((mti = LIST_FIRST(&mtimers)) != NULL) {
-
+
if (mti->mti_expire > now) {
next = mti->mti_expire;
break;
tvh_cond_timedwait(&mtimer_cond, &global_lock, next);
pthread_mutex_unlock(&global_lock);
}
-
+
return NULL;
}
// TODO: there is a risk that if timers re-insert themselves to
// the top of the list with a 0 offset we could loop indefinitely
-
+
#if 0
tvhdebug(LS_GTIMER, "now %"PRItime_t, ts.tv_sec);
LIST_FOREACH(gti, >imers, gti_link)
#endif
while((gti = LIST_FIRST(>imers)) != NULL) {
-
+
if (gti->gti_expire > now) {
ts.tv_sec = gti->gti_expire;
break;
}
if (opt_log_debug)
log_debug = opt_log_debug;
-
+
tvhlog_init(log_level, log_options, opt_logpath);
tvhlog_set_debug(log_debug);
tvhlog_set_trace(log_trace);
tvhinfo(LS_MAIN, "Log started");
-
+
signal(SIGPIPE, handle_sigpipe); // will be redundant later
signal(SIGILL, handle_sigill); // see handler..
tvhlog_options &= ~TVHLOG_OPT_STDERR;
if (!isatty(2))
tvhlog_options &= ~TVHLOG_OPT_DECORATE;
-
+
/* Initialise clock */
pthread_mutex_lock(&global_lock);
__mdispatch_clock = getmonoclock();
OPENSSL_config(NULL);
SSL_load_error_strings();
SSL_library_init();
+
+ #ifndef OPENSSL_NO_ENGINE
+ /* ENGINE init */
+ ENGINE_load_builtin_engines();
+ #endif
+
/* Rand seed */
randseed.thread_id = (void *)main_tid;
gettimeofday(&randseed.tv, NULL);
if(opt_fork)
unlink(opt_pidpath);
-
+
/* OpenSSL - welcome to the "cleanup" hell */
ENGINE_cleanup();
RAND_cleanup();