|
From: <wow...@us...> - 2015-10-14 07:16:41
|
Revision: 591
http://sourceforge.net/p/ptpd/code/591
Author: wowczarek
Date: 2015-10-14 07:16:38 +0000 (Wed, 14 Oct 2015)
Log Message:
-----------
- typo in template
- config reload flags colliding with failure code fixed
Modified Paths:
--------------
trunk/src/dep/configdefaults.c
trunk/src/dep/startup.c
Modified: trunk/src/dep/configdefaults.c
===================================================================
--- trunk/src/dep/configdefaults.c 2015-10-14 05:58:31 UTC (rev 590)
+++ trunk/src/dep/configdefaults.c 2015-10-14 07:16:38 UTC (rev 591)
@@ -56,7 +56,7 @@
{"ptpengine:unicast_negotiation", "y"},
{"ptpengine:domain", "4"},
{"ptpengine:disable_bmca", "y"},
- {"ptpentine:delay_mechanism", "E2E"},
+ {"ptpengine:delay_mechanism", "E2E"},
{"ptpengine:log_sync_interval", "-6"},
{"ptpengine:log_delayreq_interval", "-6"},
{"ptpengine:announce_receipt_timeout", "3"},
Modified: trunk/src/dep/startup.c
===================================================================
--- trunk/src/dep/startup.c 2015-10-14 05:58:31 UTC (rev 590)
+++ trunk/src/dep/startup.c 2015-10-14 07:16:38 UTC (rev 591)
@@ -147,6 +147,8 @@
do_signal_sighup(RunTimeOpts * rtOpts, PtpClock * ptpClock)
{
+ Boolean reloadSuccessful = TRUE;
+
NOTIFY("SIGHUP received\n");
#ifdef RUNTIME_DEBUG
@@ -198,14 +200,14 @@
/* If we're told to re-check lock files, do it: tmpOpts already has what rtOpts should */
if( (rtOpts->restartSubsystems & PTPD_CHECK_LOCKS) &&
tmpOpts.autoLockFile && !checkOtherLocks(&tmpOpts)) {
- rtOpts->restartSubsystems = -1;
+ reloadSuccessful = FALSE;
}
/* If the network configuration has changed, check if the interface is OK */
if(rtOpts->restartSubsystems & PTPD_RESTART_NETWORK) {
INFO("Network configuration changed - checking interface(s)\n");
if(!testInterface(tmpOpts.primaryIfaceName, &tmpOpts)) {
- rtOpts->restartSubsystems = -1;
+ reloadSuccessful = FALSE;
ERROR("Error: Cannot use %s interface\n",tmpOpts.primaryIfaceName);
}
if(rtOpts->backupIfaceEnabled && !testInterface(tmpOpts.backupIfaceName, &tmpOpts)) {
@@ -224,7 +226,7 @@
} else {
ERROR("Could bind to CPU core %d\n", tmpOpts.cpuNumber);
}
- rtOpts->restartSubsystems = -1;
+ reloadSuccessful = FALSE;
} else {
if(tmpOpts.cpuNumber > -1)
INFO("Successfully bound "PTPD_PROGNAME" to CPU core %d\n", tmpOpts.cpuNumber);
@@ -234,7 +236,7 @@
}
#endif
- if(rtOpts->restartSubsystems == -1) {
+ if(!reloadSuccessful) {
ERROR("New configuration cannot be applied - aborting reload\n");
rtOpts->restartSubsystems = 0;
goto cleanup;
@@ -889,8 +891,8 @@
free(ptpClock);
return 0;
}
-
- /* use new synchronous signal handlers */
+
+ /* establish signal handlers */
signal(SIGINT, catchSignals);
signal(SIGTERM, catchSignals);
signal(SIGHUP, catchSignals);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|