MXS-2057 Add log output for system test, and two random code fixes

This commit is contained in:
Niclas Antti 2018-11-13 17:20:39 +02:00
parent a84748e67f
commit e371964f8b
3 changed files with 3 additions and 1 deletions

View File

@ -1255,6 +1255,7 @@ static int read_log(const char* name, char** err_log_content_p)
err_log_content[size] = '\0';
// printf("s=%ld\n", strlen(err_log_content));
* err_log_content_p = err_log_content;
fclose(f);
return 0;
}
else

View File

@ -49,7 +49,7 @@ struct Duration : public Clock::duration
}
/** To seconds */
double secs()
double secs() const
{
return std::chrono::duration<double>(*this).count();
}

View File

@ -1020,6 +1020,7 @@ void RoutingWorker::check_systemd_watchdog()
{
s_watchdog_next_check = now + s_watchdog_interval;
#ifdef HAVE_SYSTEMD
MXS_DEBUG("systemd watchdog keep-alive ping: sd_notify(false, \"WATCHDOG=1\")");
sd_notify(false, "WATCHDOG=1");
#endif
std::for_each(this_unit.ppWorkers, this_unit.ppWorkers + this_unit.nWorkers,