From 81648e81ed6b2a4a08e564cec74d5327daaef2d1 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Tue, 28 Aug 2012 18:47:45 +0200 Subject: [PATCH] Always set the clock class to 255 when slave only mode is configured. Signed-off-by: Richard Cochran --- ptp4l.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ptp4l.c b/ptp4l.c index 464f991..12bb3f3 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -195,7 +195,6 @@ int main(int argc, char *argv[]) break; case 's': ds->slaveOnly = TRUE; - ds->clockQuality.clockClass = 255; *cfg_ignore |= CFG_IGNORE_SLAVEONLY; break; case 'l': @@ -226,6 +225,9 @@ int main(int argc, char *argv[]) fprintf(stderr, "failed to read configuration file\n"); return -1; } + if (ds->slaveOnly) { + ds->clockQuality.clockClass = 255; + } print_set_verbose(cfg_settings.verbose); print_set_syslog(cfg_settings.use_syslog);