summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp.c
diff options
context:
space:
mode:
authorHolger Weiss <hweiss@users.sourceforge.net>2007-04-03 17:19:04 (GMT)
committerHolger Weiss <hweiss@users.sourceforge.net>2007-04-03 17:19:04 (GMT)
commitb19f0704f31e0a7cd2d1302e964efa2b038cfae7 (patch)
treeb3d58ada989a55bfb6ef0fa5d1fe31df590ad2d0 /plugins/check_ntp.c
parentfd440b64a6aeea6dd27811b98db7192b9c8259a4 (diff)
downloadmonitoring-plugins-b19f0704f31e0a7cd2d1302e964efa2b038cfae7.tar.gz
Fix the synchronization source selection on big-endian systems.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1675 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ntp.c')
-rw-r--r--plugins/check_ntp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index cf63eea..30e5890 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -138,8 +138,8 @@ typedef struct {
138#define OP_SET(x,y) do{ x |= (y&OP_MASK); }while(0) 138#define OP_SET(x,y) do{ x |= (y&OP_MASK); }while(0)
139#define OP_READSTAT 0x01 139#define OP_READSTAT 0x01
140#define OP_READVAR 0x02 140#define OP_READVAR 0x02
141/* In peer status bytes, bytes 6,7,8 determine clock selection status */ 141/* In peer status bytes, bits 6,7,8 determine clock selection status */
142#define PEER_SEL(x) (x&0x07) 142#define PEER_SEL(x) ((ntohs(x)>>8)&0x07)
143#define PEER_INCLUDED 0x04 143#define PEER_INCLUDED 0x04
144#define PEER_SYNCSOURCE 0x06 144#define PEER_SYNCSOURCE 0x06
145 145