[ntp:hackers] refclock ONCORE question -Once again
xaos at darksmile.net
Tue Dec 28 20:18:57 UTC 2010
Sorry about the long delay. Work and all that.
So, let's take a moment here to revisit this issue and perhaps close it
once and for all.
Are we making a change to:
line: 4061, subroutine: "oncore_log"
Dave Hart is correct in that we should put:
msyslog(log_level, "%s", Msg);
If we are to do this, I should submit a bug report.
Comments are always welcome.
On 11/18/10 2:57 AM, Terje Mathisen wrote:
> Hal Murray wrote:
>> Your fix looks good to me. I assumed you noticed Dave Hart's comment:
>> msyslog uses printf style arguments rather than a simple string, so you need
>> msyslog(log_level, "%s", Msg);
>> rather than just:
>> msyslog(log_level, Msg);
>> We should probably scan the whole code base, looking for similar problems.
> I just did so for this particular syslog/msyslog problem, and it seems like the only occurence of syslog(), outside of the isc/log.c and winnt/libntp/syslog.c files is in refclock_oncore.c:
> The other refclocks which contains syslog references (in comments) are all using NLOG(NLOG_xxx) to do conditional logging.
More information about the hackers