|
From: <wow...@us...> - 2015-07-09 16:30:43
|
Revision: 581
http://sourceforge.net/p/ptpd/code/581
Author: wowczarek
Date: 2015-07-09 16:30:41 +0000 (Thu, 09 Jul 2015)
Log Message:
-----------
2.3.1.1 minor fix release preparations:
- version bump
- TimingDomain shutdown order fixed to
prevent segfault when shutting down NTP
- Cleaner NTP shutdown message
- Sequence numbers added to statistics file
- RPM spec versions updated
- default config file version number fix
Modified Paths:
--------------
trunk/m4/version.m4
trunk/packagebuild/rpm-rh/ptpd.init
trunk/packagebuild/rpm-rh/ptpd.spec
trunk/src/Makefile.am
trunk/src/dep/sys.c
trunk/src/ptpd2.conf.default-full
trunk/src/timingdomain.c
Modified: trunk/m4/version.m4
===================================================================
--- trunk/m4/version.m4 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/m4/version.m4 2015-07-09 16:30:41 UTC (rev 581)
@@ -1,4 +1,4 @@
m4_define([PTPD_URL],[http://ptpd.sourceforge.net])
m4_define([RELEASE_DATE],[June, 2015])
-m4_define([VERSION_NUMBER],[2.3.1])
+m4_define([VERSION_NUMBER],[2.3.1.1])
Modified: trunk/packagebuild/rpm-rh/ptpd.init
===================================================================
--- trunk/packagebuild/rpm-rh/ptpd.init 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/packagebuild/rpm-rh/ptpd.init 2015-07-09 16:30:41 UTC (rev 581)
@@ -202,4 +202,4 @@
esac
-exit $RETVAL
\ No newline at end of file
+exit $RETVAL
Modified: trunk/packagebuild/rpm-rh/ptpd.spec
===================================================================
--- trunk/packagebuild/rpm-rh/ptpd.spec 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/packagebuild/rpm-rh/ptpd.spec 2015-07-09 16:30:41 UTC (rev 581)
@@ -22,12 +22,12 @@
Name: ptpd
Summary: Synchronises system time using the Precision Time Protocol (PTP) implementing the IEEE 1588-2008 (PTP v 2) standard. Full version with master and slave support.
%endif
-Version: 2.3.1
-Release: 2%{distver}
+Version: 2.3.1.1
+Release: 1%{distver}
License: distributable
Group: System Environment/Daemons
Vendor: PTPd project team
-Source0: ptpd-2.3.1.tar.gz
+Source0: ptpd-2.3.1.1.tar.gz
Source2: ptpd.sysconfig
Source3: ptpd.conf
@@ -68,7 +68,7 @@
%prep
-%setup -n ptpd-2.3.1
+%setup -n ptpd-2.3.1.1
%build
@@ -215,6 +215,8 @@
%{_datadir}/ptpd/*
%changelog
+* Thu Jul 09 2015 Wojciech Owczarek <woj...@ow...> 2.3.1.1-1
+- minor version 2.3.1.1 with NTP shutdown fix
* Wed Jul 1 2015 Wojciech Owczarek <woj...@ow...> 2.3.1-2
- spec updated for OSes with systemd
- chrony detection added to postinstall checks
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/src/Makefile.am 2015-07-09 16:30:41 UTC (rev 581)
@@ -5,7 +5,7 @@
sbin_PROGRAMS = ptpd2
man_MANS = ptpd2.8 ptpd2.conf.5
-AM_CFLAGS = $(SNMP_CFLAGS) $(PCAP_CFLAGS) -Wall
+AM_CFLAGS = $(SNMP_CFLAGS) $(PCAP_CFLAGS) -Wall -fexceptions -fstack-protector
AM_CPPFLAGS = $(SNMP_CPPFLAGS) $(PCAP_CPPFLAGS)
AM_LDFLAGS = $(SNMP_LIBS) $(PCAP_LIBS)
Modified: trunk/src/dep/sys.c
===================================================================
--- trunk/src/dep/sys.c 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/src/dep/sys.c 2015-07-09 16:30:41 UTC (rev 581)
@@ -620,7 +620,7 @@
{
extern RunTimeOpts rtOpts;
static int errorMsg = 0;
- static char sbuf[SCREEN_BUFSZ];
+ static char sbuf[SCREEN_BUFSZ * 2];
int len = 0;
TimeInternal now;
time_t time_s;
@@ -641,14 +641,15 @@
ptpClock->resetStatisticsLog = FALSE;
fprintf(destination,"# %s, State, Clock ID, One Way Delay, "
"Offset From Master, Slave to Master, "
- "Master to Slave, Observed Drift, Last packet Received"
+ "Master to Slave, Observed Drift, Last packet Received, Sequence ID"
#ifdef PTPD_STATISTICS
", One Way Delay Mean, One Way Delay Std Dev, Offset From Master Mean, Offset From Master Std Dev, Observed Drift Mean, Observed Drift Std Dev, raw delayMS, raw delaySM"
#endif
"\n", (rtOpts.statisticsTimestamp == TIMESTAMP_BOTH) ? "Timestamp, Unix timestamp" : "Timestamp");
}
- memset(sbuf, ' ', sizeof(sbuf));
+ memset(sbuf, 0, sizeof(sbuf));
+
getTime(&now);
/*
@@ -677,7 +678,6 @@
}
}
-
time_s = now.seconds;
/* output date-time timestamp if configured */
@@ -744,9 +744,10 @@
len += snprint_TimeInternal(sbuf + len, sizeof(sbuf) - len,
&(ptpClock->delayMS));
- len += snprintf(sbuf + len, sizeof(sbuf) - len, ", %.09f, %c",
+ len += snprintf(sbuf + len, sizeof(sbuf) - len, ", %.09f, %c, %05d",
ptpClock->servo.observedDrift,
- ptpClock->char_last_msg);
+ ptpClock->char_last_msg,
+ ptpClock->msgTmpHeader.sequenceId);
#ifdef PTPD_STATISTICS
@@ -796,6 +797,7 @@
len += snprintf(sbuf + len, sizeof(sbuf) - len, "\n");
}
#endif
+
/* fprintf may get interrupted by a signal - silently retry once */
if (fprintf(destination, "%s", sbuf) < len) {
if (fprintf(destination, "%s", sbuf) < len) {
Modified: trunk/src/ptpd2.conf.default-full
===================================================================
--- trunk/src/ptpd2.conf.default-full 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/src/ptpd2.conf.default-full 2015-07-09 16:30:41 UTC (rev 581)
@@ -1,5 +1,5 @@
; ========================================
-; PTPDv2 version 2.3.1-rc5 default configuration
+; PTPDv2 version 2.3.1.1 default configuration
; ========================================
; NOTE: the following settings are affected by ptpengine:preset selection:
Modified: trunk/src/timingdomain.c
===================================================================
--- trunk/src/timingdomain.c 2015-07-02 08:11:00 UTC (rev 580)
+++ trunk/src/timingdomain.c 2015-07-09 16:30:41 UTC (rev 581)
@@ -533,8 +533,13 @@
NTPoptions *config = (NTPoptions*) service->config;
NTPcontrol *controller = (NTPcontrol*) service->controller;
- INFO_LOCAL_ID(service,"NTP service shutting down. Restoring original NTP state\n");
- ntpShutdown(config, controller);
+ INFO_LOCAL_ID(service,"NTP service shutting down\n");
+
+ if(controller->flagsCaptured) {
+ INFO_LOCAL_ID(service,"Restoring original NTP state\n");
+ ntpShutdown(config, controller);
+ }
+
FLAGS_UNSET(service->flags, TIMINGSERVICE_OPERATIONAL);
FLAGS_UNSET(service->flags, TIMINGSERVICE_AVAILABLE);
return 1;
@@ -693,11 +698,15 @@
INFO_LOCAL("Timing domain shutting down\n");
- for(i=0; i < domain->serviceCount; i++) {
+ for(i=domain->serviceCount - 1; i >= 0; i--) {
service = domain->services[i];
- service->shutdown(service);
+ if(service != NULL) {
+ service->shutdown(service);
+ }
}
+ INFO_LOCAL("Timing domain shutdown complete\n");
+
return 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|