made compatible with new version of cac

This commit is contained in:
Jeff Hill
2000-03-14 22:30:05 +00:00
parent f809f3a716
commit 833ea12de9
9 changed files with 42 additions and 86 deletions

View File

@@ -1,3 +1,4 @@
TOP=../..
include $(TOP)/configure/CONFIG
@@ -13,7 +14,7 @@ LIBSRCS += cast_server.c
LIBSRCS += online_notify.c
LIBRARY_IOC = rsrvIoc
rsrvIoc_DLL_LIBS = libdbStaticIoc libasIoc Com
rsrvIoc_DLL_LIBS = asIoc dbIoc ca Com
SYS_DLL_LIBS := ws2_32
include $(TOP)/configure/RULES

View File

@@ -33,16 +33,19 @@
#include <stdarg.h>
#include "osiSock.h"
#include "osiThread.h"
#include "tsStamp.h"
#include "errlog.h"
#include "db_access_routines.h"
#include "db_access.h"
#include "special.h"
#include "ellLib.h"
#include "freeList.h"
#include "caerr.h"
#include "serverInclude.h"
#define epicsExportSharedSymbols
#include "dbEvent.h"
#include "dbCommon.h"
#include "db_field_log.h"
#include "asLib.h"
#include "asDbLib.h"
#include "server.h"
static caHdr nill_msg;
@@ -500,7 +503,7 @@ db_field_log *pfl
}
return;
}
status = db_get_field(
status = db_get_field (
paddr,
pevext->msg.m_dataType,
reply + 1,

View File

@@ -36,13 +36,10 @@
#include "osiSock.h"
#include "tsStamp.h"
#include "osiThread.h"
#include "errlog.h"
#include "ellLib.h"
#include "taskwd.h"
#include "db_access.h"
#include "serverInclude.h"
#define epicsExportSharedSymbols
#include "server.h"
/*

View File

@@ -34,10 +34,7 @@
#include "osiSock.h"
#include "tsStamp.h"
#include "ellLib.h"
#include "errlog.h"
#include "serverInclude.h"
#define epicsExportSharedSymbols
#include "server.h"
/*

View File

@@ -38,18 +38,15 @@
#include <errno.h>
#include "osiSock.h"
#include "osiThread.h"
#include "tsStamp.h"
#include "errlog.h"
#include "ellLib.h"
#include "taskwd.h"
#include "db_access.h"
#include "envDefs.h"
#include "addrList.h"
#include "freeList.h"
#include "errlog.h"
#include "dbEvent.h"
#include "dbCommon.h"
#include "serverInclude.h"
#define epicsExportSharedSymbols
#define GLBLSOURCE
#include "server.h"
@@ -271,7 +268,7 @@ LOCAL int req_server (void)
taskwdInsert (threadGetIdSelf(), NULL, NULL);
ca_server_port = caFetchPortConfig (&EPICS_CA_SERVER_PORT, CA_SERVER_PORT);
ca_server_port = envGetInetPortConfigParam (&EPICS_CA_SERVER_PORT, CA_SERVER_PORT);
if (IOC_sock != 0 && IOC_sock != INVALID_SOCKET)
if ((status = socket_close(IOC_sock)) < 0)
@@ -527,7 +524,7 @@ void casr (unsigned level)
UNLOCK_CLIENTQ;
}
caPrintAddrList (&beaconAddrList);
printChannelAccessAddressList (&beaconAddrList);
}
}

View File

@@ -50,16 +50,12 @@
#include <errno.h>
#include "osiSock.h"
#include "tsStamp.h"
#include "osiThread.h"
#include "errlog.h"
#include "ellLib.h"
#include "taskwd.h"
#include "db_access.h"
#include "tsStamp.h"
#include "envDefs.h"
#include "freeList.h"
#include "serverInclude.h"
#define epicsExportSharedSymbols
#include "server.h"
#define TIMEOUT 60.0 /* sec */
@@ -134,7 +130,7 @@ int cast_server(void)
taskwdInsert(threadGetIdSelf(),NULL,NULL);
port = caFetchPortConfig(&EPICS_CA_SERVER_PORT, CA_SERVER_PORT);
port = envGetInetPortConfigParam (&EPICS_CA_SERVER_PORT, CA_SERVER_PORT);
recv_addr_size = sizeof(new_recv_addr);
@@ -223,7 +219,7 @@ int cast_server(void)
IOC_cast_sock,
prsrv_cast_client->recv.buf,
sizeof(prsrv_cast_client->recv.buf),
NULL,
0,
(struct sockaddr *)&new_recv_addr,
&recv_addr_size);
if (status<0) {

View File

@@ -41,13 +41,13 @@
* EPICS includes
*/
#include "osiSock.h"
#include "osiThread.h"
#include "osiPoolStatus.h"
#include "tsStamp.h"
#include "errlog.h"
#include "envDefs.h"
#include "serverInclude.h"
#define epicsExportSharedSymbols
#include "addrList.h"
#include "taskwd.h"
#include "server.h"
/*
@@ -122,11 +122,14 @@ int rsrv_online_notify_task()
* load user and auto configured
* broadcast address list
*/
port = caFetchPortConfig(&EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT);
caSetupBCastAddrList (&beaconAddrList, sock, port);
port = envGetInetPortConfigParam (&EPICS_CA_REPEATER_PORT, CA_REPEATER_PORT);
configureChannelAccessAddressList (&beaconAddrList, sock, port);
if ( ellCount ( &beaconAddrList ) == 0 ) {
errlogPrintf ("The CA server's beacon address list was empty after initialization?\n");
}
# ifdef DEBUG
caPrintAddrList (&beaconAddrList);
printChannelAccessAddressList (&beaconAddrList);
# endif
while (TRUE) {
@@ -141,9 +144,9 @@ int rsrv_online_notify_task()
while (pNode) {
char buf[64];
status = connect (sock, &pNode->destAddr.sa, sizeof(pNode->destAddr.sa));
status = connect (sock, &pNode->addr.sa, sizeof(pNode->addr.sa));
if (status<0) {
ipAddrToA (&pNode->destAddr.in, buf, sizeof(buf));
ipAddrToA (&pNode->addr.ia, buf, sizeof(buf));
errlogPrintf ( "%s: CA beacon routing (connect to \"%s\") error was \"%s\"\n",
__FILE__, buf, SOCKERRSTR(SOCKERRNO));
}
@@ -164,7 +167,7 @@ printf ("**** Setting local address to \"%s\" - this may not work correctly ****
status = send (sock, (char *)&msg, sizeof(msg), 0);
if (status < 0) {
ipAddrToA (&pNode->destAddr.in, buf, sizeof(buf));
ipAddrToA (&pNode->addr.ia, buf, sizeof(buf));
errlogPrintf ( "%s: CA beacon (send to \"%s\") error was \"%s\"\n",
__FILE__, buf, SOCKERRSTR(SOCKERRNO));
}

View File

@@ -30,17 +30,19 @@
#ifndef INCLserverh
#define INCLserverh
static char *serverhSccsId = "@(#) $Id$";
#if defined(CAS_VERSION_GLOBAL) && 0
# define HDRVERSIONID(NAME,VERS) VERSIONID(NAME,VERS)
#else /*CAS_VERSION_GLOBAL*/
# define HDRVERSIONID(NAME,VERS)
#endif /*CAS_VERSION_GLOBAL*/
#include "osiThread.h"
#include "bucketLib.h"
#include "asLib.h"
#include "dbAddr.h"
#include "dbNotify.h"
#include "caProto.h"
#include "ellLib.h"
#define RSRV_OK 0
#define RSRV_ERROR (-1)
#define LOCAL static
/*
* !! buf must be the first item in this structure !!
* This guarantees that buf will have 8 byte natural

View File

@@ -1,40 +0,0 @@
/*serverInclude.h */
/*****************************************************************
COPYRIGHT NOTIFICATION
*****************************************************************
(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO
This software was developed under a United States Government license
described on the COPYRIGHT_UniversityOfChicago file included as part
of this distribution.
**********************************************************************/
#ifndef INCLserverIncludeh
#define INCLserverIncludeh
#include "epicsAssert.h"
#include "shareLib.h"
#include "ellLib.h"
#include "callback.h"
#include "osiSem.h"
#include "osiThread.h"
#include "osiSock.h"
#include "addrList.h"
#include "net_convert.h"
#include "dbDefs.h"
#include "dbAddr.h"
#include "db_access.h"
#include "dbCommon.h"
#include "dbNotify.h"
#include "db_field_log.h"
#include "dbEvent.h"
#include "caProto.h"
#include "bucketLib.h"
#include "taskwd.h"
#include "asLib.h"
#include "asDbLib.h"
#endif /*INCLserverIncludeh*/