From: <id...@us...> - 2012-05-23 19:12:55
|
Revision: 190 http://ptpd.svn.sourceforge.net/ptpd/?rev=190&view=rev Author: idfg Date: 2012-05-23 19:12:49 +0000 (Wed, 23 May 2012) Log Message: ----------- Add fix to update ptpClock->recvPDelayRespSequenceId in handlePDelayResp. Add ifdef around RUNTIME_DEBUG helper functions so that ptpd2 builds when Makefile flag RUNTIME_DEBUG is disabled and other PTPD_DBG flags are enabled. Modified Paths: -------------- trunk/src/dep/startup.c trunk/src/protocol.c Modified: trunk/src/dep/startup.c =================================================================== --- trunk/src/dep/startup.c 2012-05-08 00:23:36 UTC (rev 189) +++ trunk/src/dep/startup.c 2012-05-23 19:12:49 UTC (rev 190) @@ -227,6 +227,7 @@ } +#ifdef RUNTIME_DEBUG /* These functions are useful to temporarily enable Debug around parts of code, similar to bash's "set -x" */ void enable_runtime_debug(void ) { @@ -241,8 +242,8 @@ rtOpts.debug_level = LOG_INFO; } +#endif - /* * Lock via filesystem implementation, as described in "Advanced Programming in the UNIX Environment, 2nd ed" */ Modified: trunk/src/protocol.c =================================================================== --- trunk/src/protocol.c 2012-05-08 00:23:36 UTC (rev 189) +++ trunk/src/protocol.c 2012-05-23 19:12:49 UTC (rev 190) @@ -1330,7 +1330,6 @@ integer64_to_internalTime(header->correctionField,&correctionField); ptpClock->lastPdelayRespCorrectionField.seconds = correctionField.seconds; ptpClock->lastPdelayRespCorrectionField.nanoseconds = correctionField.nanoseconds; - break; } else { /* One step Clock */ /*Store t4 (Fig 35)*/ @@ -1339,10 +1338,9 @@ integer64_to_internalTime(header->correctionField,&correctionField); updatePeerDelay (&ptpClock->owd_filt,rtOpts,ptpClock,&correctionField,FALSE); - break; } ptpClock->recvPDelayRespSequenceId = header->sequenceId; - + break; } else { DBGV("HandlePdelayResp : Pdelayresp doesn't " "match with the PdelayReq. \n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |