From f2a0bd2ff8e3b9cdf311bb229655937f9667aa15 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 12 Feb 2002 00:45:04 +0000 Subject: [PATCH] detect beacons duplicated by redundant routes --- src/rsrv/online_notify.c | 5 +++++ src/rsrv/server.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rsrv/online_notify.c b/src/rsrv/online_notify.c index 1ae34b911..9d18a2a49 100644 --- a/src/rsrv/online_notify.c +++ b/src/rsrv/online_notify.c @@ -84,6 +84,7 @@ int rsrv_online_notify_task() SOCKET sock; int true = TRUE; unsigned short port; + ca_uint32_t beaconCounter = 0; casSufficentSpaceInPool = osiSufficentSpaceInPool (); @@ -136,6 +137,7 @@ int rsrv_online_notify_task() memset((char *)&msg, 0, sizeof msg); msg.m_cmmd = htons (CA_PROTO_RSRV_IS_UP); msg.m_count = htons (ca_server_port); + msg.m_dataType = htons (CA_MINOR_PROTOCOL_REVISION); ellInit (&beaconAddrList); @@ -185,6 +187,7 @@ int rsrv_online_notify_task() } else if (if_addr.sin_family==AF_INET) { msg.m_available = if_addr.sin_addr.s_addr; + msg.m_cid = htonl ( beaconCounter ); status = send (sock, (char *)&msg, sizeof(msg), 0); if (status < 0) { @@ -207,6 +210,8 @@ int rsrv_online_notify_task() delay = maxdelay; } } + + beaconCounter++; /* expected to overflow */ } } diff --git a/src/rsrv/server.h b/src/rsrv/server.h index ffd2dd85f..7feca498f 100644 --- a/src/rsrv/server.h +++ b/src/rsrv/server.h @@ -41,7 +41,7 @@ #include "asLib.h" #include "dbAddr.h" #include "dbNotify.h" -#define CA_MINOR_PROTOCOL_REVISION 9 +#define CA_MINOR_PROTOCOL_REVISION 10 #include "caProto.h" #include "ellLib.h" #include "epicsTime.h"