mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 06:15:07 -05:00
logging: call exit() in LOG_Message()
Call exit() in LOG_Message() after printing a fatal message to allow the LOG macro or LOG_Message() to be used directly instead of the LOG_FATAL macro.
This commit is contained in:
@@ -169,6 +169,7 @@ void LOG_Message(LOG_Severity severity,
|
|||||||
system_log = 0;
|
system_log = 0;
|
||||||
log_message(1, severity, buf);
|
log_message(1, severity, buf);
|
||||||
}
|
}
|
||||||
|
exit(1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|||||||
@@ -256,10 +256,8 @@ SYS_Timex_Adjust(struct timex *txc, int ignore_error)
|
|||||||
state = NTP_ADJTIME(txc);
|
state = NTP_ADJTIME(txc);
|
||||||
|
|
||||||
if (state < 0) {
|
if (state < 0) {
|
||||||
if (!ignore_error)
|
LOG(ignore_error ? LOGS_DEBUG : LOGS_FATAL,
|
||||||
LOG_FATAL(NTP_ADJTIME_NAME"(0x%x) failed : %s", txc->modes, strerror(errno));
|
NTP_ADJTIME_NAME"(0x%x) failed : %s", txc->modes, strerror(errno));
|
||||||
else
|
|
||||||
DEBUG_LOG(NTP_ADJTIME_NAME"(0x%x) failed : %s", txc->modes, strerror(errno));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
|
|||||||
Reference in New Issue
Block a user