[Git][NTPsec/ntpsec][master] Add .refclockd as a recognized config prefix.
Eric S. Raymond
gitlab at mg.gitlab.com
Sat Mar 25 04:51:09 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
62d14129 by Eric S. Raymond at 2017-03-25T00:50:58-04:00
Add .refclockd as a recognized config prefix.
- - - - -
1 changed file:
- ntpd/ntp_scanner.c
Changes:
=====================================
ntpd/ntp_scanner.c
=====================================
--- a/ntpd/ntp_scanner.c
+++ b/ntpd/ntp_scanner.c
@@ -49,7 +49,8 @@ static struct FILE_INFO * lex_stack = NULL;
/* CONSTANTS AND MACROS
* --------------------
*/
-#define CONF_ENABLE(s) (strcmp(s + strlen(s) - 5, ".ntpd") == 0)
+#define ENDSWITH(str, suff) (strcmp(str + strlen(str) - strlen(suff), suff)==0)
+#define CONF_ENABLE(s) (ENDSWITH(s, ".ntpd") || ENDSWITH(s, ".refclockd"))
/* SCANNER GLOBAL VARIABLES
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/62d1412989d2b1be536ef4b22af90294bf7b06a0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170325/57f85d0c/attachment.html>
More information about the vc
mailing list