Switch to thread safe versions of localtime and asctime

This commit is contained in:
Mark Riddoch
2014-12-03 09:53:17 +00:00
parent 1e5bc37780
commit fdb9c5e6dc
3 changed files with 29 additions and 12 deletions

View File

@ -344,8 +344,10 @@ SERVER_PARAM *param;
}
}
if (server->node_ts > 0) {
struct tm result;
char buf[40];
dcb_printf(dcb, "\tLast Repl Heartbeat:\t%s",
asctime(localtime(&server->node_ts)));
asctime_r(localtime_r((time_t *)(&server->node_ts), &result), buf));
}
if ((param = server->parameters) != NULL)
{