Settings-Datei fortgesetzt
This commit is contained in:
7
main.c
7
main.c
@@ -166,10 +166,10 @@ void *thread_func(void *data)
|
||||
while (iThreadControl == 0)
|
||||
{
|
||||
pinfo.cyclecounter++;
|
||||
if (pinfo.cyclecounter >= 86400000)
|
||||
if (pinfo.cyclecounter > CYCLE_COUNTER_MAX)
|
||||
{
|
||||
// Reset cycle counter every 24h
|
||||
pinfo.cyclecounter = 0;
|
||||
pinfo.cyclecounter = 1;
|
||||
}
|
||||
do_cyclic_1ms(&pinfo);
|
||||
wait_rest_of_period(&pinfo);
|
||||
@@ -219,6 +219,9 @@ int main(int argc, char* argv[])
|
||||
openlog("CanRtDriver", LOG_PID | LOG_CONS, LOG_DAEMON);
|
||||
mylog(LOG_INFO, "Service started. PID: %d", getpid());
|
||||
|
||||
// Read the settings file after opening the log
|
||||
Settings_ReadConfFile();
|
||||
|
||||
// catch signals
|
||||
if (signal(SIGTERM, sig_handler) == SIG_ERR)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user