⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 6

📁 Unix/Linux 网络时间协议版本3 Network Time Protocol Version 3 (NTP) distribution for Unix systems
💻
字号:
Replied: Fri, 29 Aug 1997 18:29:19 -0400Replied: ""Ulrich Windl" <ulrich.windl@rz.uni-regensburg.de> "Return-Path: Ulrich.Windl@rz.uni-regensburg.de Return-Path: <Ulrich.Windl@rz.uni-regensburg.de>Received: from rrzs2.rz.uni-regensburg.de (rrzs2.rz.uni-regensburg.de [132.199.1.2])	by whimsy.udel.edu (8.8.5/8.8.5) with ESMTP id GAA19005	for <stenn@whimsy.udel.edu>; Tue, 26 Aug 1997 06:55:28 GMTReceived: from ngate.ngate.uni-regensburg.de (ngate.rz.uni-regensburg.de [132.199.3.13])	by rrzs2.rz.uni-regensburg.de (8.8.5/8.8.5) with SMTP id IAA24666	for <stenn@whimsy.udel.edu>; Tue, 26 Aug 1997 08:55:22 +0200 (MET DST)Received: from rkdvmks1.ngate.uni-regensburg.de by ngate.ngate.uni-regensburg.de; Tue, 26 Aug 97 07:55 METReceived: from rkdvmks1.ngate.uni-regensburg.de by kgate.ngate.uni-regensburg.de; Tue, 26 Aug 97 06:51 GMTReceived: from RKDVMKS1/SpoolDir by rkdvmks1.ngate.uni-regensburg.de (Mercury 1.31);    26 Aug 97 08:55:17 +0200Received: from SpoolDir by RKDVMKS1 (Mercury 1.31); 26 Aug 97 08:55:03 +0200From: "Ulrich Windl" <ulrich.windl@rz.uni-regensburg.de>Organization: Universitaet Regensburg, KlinikumTo: stenn@whimsy.udel.eduDate: Tue, 26 Aug 1997 08:55:01 +0200MIME-Version: 1.0Content-Type: text/plain; charset=US-ASCIIContent-transfer-encoding: 7BITSubject: ntp_config.c is buggy ("clockall")Priority: normalX-mailer: Pegasus Mail for Windows (v2.53/R1)Message-ID: <641BB7018CD@rkdvmks1.ngate.uni-regensburg.de>Yesterday I found out that ntp_config.c is buggy insofar as a"logconfig +clockall" is accepted without error (should be"allclock").Moreover, the value set in the logmask is wrong (should not beshifted). The value used is "0xffff << 8".A quick-and dirty fix would be to check in line 443 of ntp_config.c for the condition ``if ( offset != 0 && strncmp(t, "all", 3) == 0 )''or you cound negate the condition above and add it with "&&" to the condition in the "if" (else error).Maybe a cleaner fix would be to change some of the defines:#define	MASK_INFO	0x11111111#define MASK_EVENT	0x22222222#define	MASK_STATUS	0x44444444#define	MASK_STATIST	0x88888888#define	MASK_ALL	0xffffffffand#define	FACILITY_SYS	0x0000000f#define	FACILITY_PEER	0x000000f0#define	FACILITY_CLOCK	0x00000f00#define	FACILITY_SYNC	0x0000f000#define	FACILITY_ALL	0x0000ffff	/* maybe 0xffffffff */Anding the MASK with the FACILITY would give:"peerstatus" == (0x44444444 & 0x000000f0) ---> 0x00000040The advantage is that it would be commutative (i.e. "peerstatus" == "statuspeer"), and ("{}" denoting the empty string) "all" would be equivalent to "{}all", "all{}", and "allall" ;-)I think the parser would be a bit easier and more consistent then. I think "allall" should be really allowed.I haven't checked all the places where NLOG* is used, but I think the change is possible...Ulrich

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -