Permalink
Browse files

Cleaned up in_addr definitions used in DBGV() not being compiled for

some debug options
1 parent d3aee23 commit 235e9b492863b6a7d394a0c62d5f8e3d4d19930f @wowczarek wowczarek committed Nov 11, 2016
Showing with 7 additions and 8 deletions.
  1. +1 −1 src/dep/ntpengine/ntpdcontrol.c
  2. +2 −2 src/protocol.c
  3. +4 −5 src/signaling.c
@@ -688,7 +688,7 @@ NTPDCquery(
* Try to be compatible with older implementations of ntpd.
*/
if (res == INFO_ERR_FMT && req_pkt_size != 48) {
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
int oldsize = req_pkt_size;
#endif /* RUNTIME_DEBUG */
View
@@ -110,7 +110,7 @@ indexSync(TimeInternal *timeStamp, UInteger16 sequenceId, Integer32 transportAdd
uint32_t hash = 0;
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
struct in_addr tmpAddr;
tmpAddr.s_addr = transportAddress;
#endif /* RUNTIME_DEBUG */
@@ -1272,7 +1272,7 @@ processMessage(RunTimeOpts* rtOpts, PtpClock* ptpClock, TimeInternal* timeStamp,
/* packet is not from self, and is from a non-zero source address - check ACLs */
if(ptpClock->netPath.lastSourceAddr &&
(ptpClock->netPath.lastSourceAddr != ptpClock->netPath.interfaceAddr.s_addr)) {
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
struct in_addr tmpAddr;
tmpAddr.s_addr = ptpClock->netPath.lastSourceAddr;
#endif /* RUNTIME_DEBUG */
View
@@ -312,7 +312,7 @@ handleSMRequestUnicastTransmission(MsgSignaling* incoming, MsgSignaling* outgoin
SMRequestUnicastTransmission* requestData = (SMRequestUnicastTransmission*)incoming->tlv->valueField;
SMGrantUnicastTransmission* grantData = NULL;
Enumeration8 messageType = requestData->messageType;
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
struct in_addr tmpAddr;
tmpAddr.s_addr = sourceAddress;
#endif /* RUNTIME_DEBUG */
@@ -453,7 +453,7 @@ handleSMGrantUnicastTransmission(MsgSignaling* incoming, Integer32 sourceAddress
UnicastGrantData *myGrant;
Enumeration8 messageType = incomingGrant->messageType;
UnicastGrantTable *nodeTable;
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
struct in_addr tmpAddr;
tmpAddr.s_addr = sourceAddress;
#endif /* RUNTIME_DEBUG */
@@ -539,7 +539,7 @@ handleSMCancelUnicastTransmission(MsgSignaling* incoming, MsgSignaling* outgoing
UnicastGrantData *myGrant;
Enumeration8 messageType = requestData->messageType;
UnicastGrantTable *nodeTable;
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
struct in_addr tmpAddr;
tmpAddr.s_addr = sourceAddress;
#endif /* RUNTIME_DEBUG */
@@ -622,8 +622,7 @@ handleSMAcknowledgeCancelUnicastTransmission(MsgSignaling* incoming, Integer32 s
UnicastGrantData *myGrant;
Enumeration8 messageType = requestData->messageType;
UnicastGrantTable *nodeTable;
-
-#ifdef RUNTIME_DEBUG
+#if defined(RUNTIME_DEBUG) || defined (PTPD_DBGV)
struct in_addr tmpAddr;
tmpAddr.s_addr = sourceAddress;
#endif /* RUNTIME_DEBUG */

0 comments on commit 235e9b4

Please sign in to comment.