This reverts commit
aadcfc9ea6dce6ba800568067a45b879c8c5039e.
The parts affecting the DeviceAtlas addon were wrong actually, the
"now" variable was a local time_t in a file that's not compiled with
the haproxy binary (dadwsch). Only the fix to the calltrace is correct,
so better revert and fix the only one in a separate commit. No backport
is needed.
{
time_t now = time(NULL);
char buf[26] = {0};
- ctime_r(&date, buf);
+ ctime_r(&now, buf);
buf[24] = 0;
fprintf(stderr, "%s: %s\n", buf, msg);
}
jsond = da_getdatacreation(&o->atlas);
dwgetfinalp(o->dcfg.info, atlasp, sizeof(atlasp));
ctime_r(&jsond, jsondbuf);
- ctime_r(&date, buf);
+ ctime_r(&now, buf);
jsondbuf[24] = 0;
buf[24] = 0;
if (!dset) {
time_t now = time(NULL);
- struct tm *cnow = gmtime(&date);
+ struct tm *cnow = gmtime(&now);
memcpy(&global_deviceatlassch.o.dcfg.info.rtm, cnow, offsetof(struct tm, tm_mday));
}
if (!log)
log = stderr;
- now_ptr = &date;
+ now_ptr = &now;
if (getenv("HAPROXY_TRACE_FAST") != NULL) {
fast_time = 1;
now_ptr = &trace_now;