*** empty log message ***
This commit is contained in:
+9
-6
@@ -62,24 +62,27 @@
|
||||
/************************************************************************/
|
||||
/*_end */
|
||||
|
||||
/*
|
||||
* allocate error message string array
|
||||
* here so I can use sizeof
|
||||
*/
|
||||
#define CA_ERROR_GLBLSOURCE
|
||||
|
||||
#if defined(VMS)
|
||||
# include stsdef.h
|
||||
# include ssdef.h
|
||||
# include psldef.h
|
||||
# include prcdef.h
|
||||
# include descrip.h
|
||||
#elif defined(UNIX)
|
||||
#elif defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# include <taskLib.h>
|
||||
# include <task_params.h>
|
||||
#else
|
||||
@@@@ dont compile @@@@
|
||||
#endif
|
||||
|
||||
/*
|
||||
* allocate error message string array
|
||||
* here so I can use sizeof
|
||||
*/
|
||||
#define CA_ERROR_GLBLSOURCE
|
||||
|
||||
/*
|
||||
* allocate db_access message strings here
|
||||
*/
|
||||
|
||||
+6
-7
@@ -7,17 +7,16 @@
|
||||
|
||||
|
||||
/* System includes */
|
||||
#ifdef UNIX
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <vxWorks.h>
|
||||
#ifdef vxWorks
|
||||
#include <taskLib.h>
|
||||
#if defined(UNIX)
|
||||
# include <stdio.h>
|
||||
#elif defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# include <taskLib.h>
|
||||
#endif
|
||||
|
||||
#include <cadef.h>
|
||||
#include <db_access.h>
|
||||
#include <os_depen.h>
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+8
-5
@@ -24,11 +24,14 @@
|
||||
/* */
|
||||
/************************************************************************/
|
||||
/*_end */
|
||||
#ifdef UNIX
|
||||
#include <stdio.h>
|
||||
#if defined(UNIX)
|
||||
# include <stdio.h>
|
||||
#elif defined(VMS)
|
||||
#elif defined(vxWorks)
|
||||
#else
|
||||
@@@@ dont compile @@@@
|
||||
#endif
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <cadef.h>
|
||||
#include <db_access.h>
|
||||
#include <iocmsg.h>
|
||||
@@ -108,8 +111,8 @@ char silent;
|
||||
#endif
|
||||
|
||||
if(!silent && retry_cnt_no_handler){
|
||||
sprintf(string, "%d channels outstanding", retry_cnt);
|
||||
ca_signal(ECA_CHIDRETRY, string);
|
||||
sprintf(sprintf_buf, "%d channels outstanding", retry_cnt);
|
||||
ca_signal(ECA_CHIDRETRY, sprintf_buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+22
-6
@@ -34,13 +34,29 @@
|
||||
/*_end */
|
||||
|
||||
|
||||
#include <types.h>
|
||||
#include <vxWorks.h>
|
||||
#include <socket.h>
|
||||
#include <ioctl.h>
|
||||
#ifdef vxWorks
|
||||
#include <ioLib.h>
|
||||
#if defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# include <ioLib.h>
|
||||
# include <socket.h>
|
||||
# include <ioctl.h>
|
||||
# ifdef V5_vxWorks
|
||||
# include <vxTypes.h>
|
||||
# else
|
||||
# include <types.h>
|
||||
# endif
|
||||
#elif defined(VMS)
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <sys/ioctl.h>
|
||||
#elif defined(UNIX)
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <sys/ioctl.h>
|
||||
#else
|
||||
@@@@ dont compile @@@@
|
||||
#endif
|
||||
|
||||
#include <os_depen.h>
|
||||
#include <cadef.h>
|
||||
#include <iocmsg.h>
|
||||
#include <iocinf.h>
|
||||
|
||||
+91
-69
@@ -18,6 +18,12 @@
|
||||
/* each message */
|
||||
/* 071291 joh no longer sends id at TCP connect */
|
||||
/* 082791 joh split send_msg() into two subroutines */
|
||||
/* 110491 joh call recv_msg to free up deadlock only if */
|
||||
/* client blocks on send as before */
|
||||
/* 110491 joh mark all channels disconnected prior to */
|
||||
/* calling the first connection handler on */
|
||||
/* disconnect */
|
||||
/* 110491 joh allow cac_send_msg() to be called recursively */
|
||||
/* */
|
||||
/*_begin */
|
||||
/************************************************************************/
|
||||
@@ -48,21 +54,23 @@
|
||||
|
||||
#if defined(VMS)
|
||||
# include <iodef.h>
|
||||
# include <inetiodef.h>
|
||||
# include <stsdef.h>
|
||||
# include <types.h>
|
||||
# include <errno.h>
|
||||
# include <socket.h>
|
||||
# include <in.h>
|
||||
# include <tcp.h>
|
||||
# include <ioctl.h>
|
||||
# include <sys/types.h>
|
||||
# define __TIME /* dont include VMS CC time.h under MULTINET */
|
||||
# include <sys/time.h>
|
||||
# include <vms/inetiodef.h>
|
||||
# include <tcp/errno.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netinet/tcp.h>
|
||||
# include <sys/ioctl.h>
|
||||
#elif defined(UNIX)
|
||||
# include <types.h>
|
||||
# include <errno.h>
|
||||
# include <socket.h>
|
||||
# include <in.h>
|
||||
# include <tcp.h>
|
||||
# include <ioctl.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/errno.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <netinet/tcp.h>
|
||||
# include <sys/ioctl.h>
|
||||
#elif defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# ifdef V5_vxWorks
|
||||
@@ -464,7 +472,7 @@ struct ioc_in_use *piiu;
|
||||
|
||||
|
||||
/* Set up recv thread for VMS */
|
||||
#ifdef VMS
|
||||
# if defined(VMS)
|
||||
{
|
||||
/*
|
||||
* request to be informed of future IO
|
||||
@@ -487,8 +495,7 @@ struct ioc_in_use *piiu;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
# endif
|
||||
# ifdef vxWorks
|
||||
# elif defined(vxWorks)
|
||||
{
|
||||
void recv_task();
|
||||
int pri;
|
||||
@@ -518,7 +525,7 @@ struct ioc_in_use *piiu;
|
||||
piiu->recv_tid = status;
|
||||
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
return ECA_NORMAL;
|
||||
}
|
||||
@@ -582,12 +589,14 @@ void cac_send_msg()
|
||||
if(!ca_static->ca_repeater_contacted)
|
||||
notify_ca_repeater();
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* dont call it recursively
|
||||
*/
|
||||
if(send_msg_active){
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
send_msg_active++;
|
||||
|
||||
@@ -596,8 +605,10 @@ void cac_send_msg()
|
||||
*
|
||||
*/
|
||||
while(TRUE){
|
||||
|
||||
|
||||
done = TRUE;
|
||||
for(piiu=iiu;piiu<&iiu[nxtiiu];piiu++){
|
||||
for(piiu=iiu; piiu<&iiu[nxtiiu]; piiu++){
|
||||
|
||||
if(!piiu->send->stk)
|
||||
continue;
|
||||
@@ -615,7 +626,7 @@ void cac_send_msg()
|
||||
if(done){
|
||||
/*
|
||||
* allways double check that we
|
||||
* are finished incase somthing was added
|
||||
* are finished in case somthing was added
|
||||
* to a send buffer and a recursive
|
||||
* ca_send_msg() call was refused above
|
||||
*/
|
||||
@@ -628,17 +639,6 @@ void cac_send_msg()
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure we do not accumulate extra recv
|
||||
* messages (for TCP)
|
||||
*/
|
||||
/*
|
||||
* free up push pull deadlock only
|
||||
* if recv not already in progress
|
||||
*/
|
||||
if(post_msg_active==0)
|
||||
recv_msg_select(¬imeout);
|
||||
|
||||
if(retry_count-- <= 0){
|
||||
char *iocname;
|
||||
struct in_addr *inaddr;
|
||||
@@ -647,7 +647,6 @@ void cac_send_msg()
|
||||
inaddr = &piiu->sock_addr.sin_addr;
|
||||
iocname = host_from_addr(inaddr);
|
||||
#ifdef CLOSE_ON_EXPIRED
|
||||
|
||||
ca_signal(ECA_DLCKREST, iocname);
|
||||
close_ioc(piiu);
|
||||
#else
|
||||
@@ -685,24 +684,18 @@ register struct ioc_in_use *piiu;
|
||||
pmsg = (void *) piiu->send->buf;
|
||||
|
||||
while(TRUE){
|
||||
int sock;
|
||||
|
||||
|
||||
if(piiu->conn_up){
|
||||
/*
|
||||
* send UDP or TCP message depending
|
||||
* on whether this channel has a TCP
|
||||
* connection yet
|
||||
*
|
||||
/*
|
||||
* use TCP if connection exists
|
||||
*/
|
||||
status = sendto(
|
||||
piiu->sock_chan,
|
||||
pmsg,
|
||||
cnt,
|
||||
0,
|
||||
&piiu->sock_addr,
|
||||
sizeof(piiu->sock_addr));
|
||||
sock = piiu->sock_chan;
|
||||
}
|
||||
else{
|
||||
/*
|
||||
* send UDP message
|
||||
* use UDP
|
||||
*
|
||||
* NOTE: this does not use a broadcast
|
||||
* if the location of the channel is
|
||||
@@ -711,26 +704,30 @@ register struct ioc_in_use *piiu;
|
||||
* (piiu->sock_addr points to the
|
||||
* known address)
|
||||
*/
|
||||
status = sendto(
|
||||
iiu[BROADCAST_IIU].sock_chan,
|
||||
pmsg,
|
||||
cnt,
|
||||
0,
|
||||
&piiu->sock_addr,
|
||||
sizeof(piiu->sock_addr));
|
||||
if(!iiu[BROADCAST_IIU].conn_up)
|
||||
return ERROR;
|
||||
|
||||
sock = iiu[BROADCAST_IIU].sock_chan;
|
||||
}
|
||||
status = sendto(
|
||||
sock,
|
||||
pmsg,
|
||||
cnt,
|
||||
0,
|
||||
&piiu->sock_addr,
|
||||
sizeof(piiu->sock_addr));
|
||||
|
||||
/*
|
||||
* normal fast exit
|
||||
*/
|
||||
if(status == cnt)
|
||||
if(status == cnt){
|
||||
break;
|
||||
|
||||
if(status>=0){
|
||||
}
|
||||
else if(status>=0){
|
||||
if(status>cnt){
|
||||
ca_signal(
|
||||
ECA_INTERNAL,
|
||||
"more sent than requested");
|
||||
"more sent than requested ?");
|
||||
}
|
||||
|
||||
cnt = cnt-status;
|
||||
@@ -748,14 +745,25 @@ register struct ioc_in_use *piiu;
|
||||
cnt);
|
||||
piiu->send->stk = cnt;
|
||||
}
|
||||
/*
|
||||
* Ensure we do not accumulate extra recv
|
||||
* messages (for TCP)
|
||||
*
|
||||
* frees up push pull deadlock only
|
||||
* if recv not already in progress
|
||||
*/
|
||||
if(post_msg_active==0)
|
||||
recv_msg_select(¬imeout);
|
||||
|
||||
return ERROR;
|
||||
}
|
||||
#endif
|
||||
else{
|
||||
if(MYERRNO != EPIPE && MYERRNO != ECONNRESET)
|
||||
printf(
|
||||
"CA: error on socket send() %d\n",
|
||||
MYERRNO);
|
||||
if(MYERRNO != EPIPE && MYERRNO != ECONNRESET){
|
||||
printf(
|
||||
"CA: error on socket send() %d\n",
|
||||
MYERRNO);
|
||||
}
|
||||
close_ioc(piiu);
|
||||
return OK;
|
||||
}
|
||||
@@ -884,8 +892,7 @@ struct ioc_in_use *piiu;
|
||||
void tcp_recv_msg(piiu)
|
||||
struct ioc_in_use *piiu;
|
||||
{
|
||||
unsigned long byte_cnt;
|
||||
unsigned long byte_sum;
|
||||
long byte_cnt;
|
||||
int status;
|
||||
int timeoutcnt;
|
||||
struct buffer *rcvb = piiu->recv;
|
||||
@@ -926,9 +933,9 @@ struct ioc_in_use *piiu;
|
||||
}
|
||||
|
||||
|
||||
byte_cnt = (unsigned long) status;
|
||||
byte_cnt = (long) status;
|
||||
if(byte_cnt>MAX_MSG_SIZE){
|
||||
printf( "recv_msg(): message overflow %u\n",
|
||||
printf( "recv_msg(): message overflow %l\n",
|
||||
byte_cnt-MAX_MSG_SIZE);
|
||||
LOCK;
|
||||
close_ioc(piiu);
|
||||
@@ -945,7 +952,7 @@ struct ioc_in_use *piiu;
|
||||
&byte_cnt,
|
||||
&piiu->sock_addr.sin_addr,
|
||||
piiu);
|
||||
if(byte_cnt){
|
||||
if(byte_cnt>0){
|
||||
/*
|
||||
* realign partial message
|
||||
*/
|
||||
@@ -985,8 +992,7 @@ struct ioc_in_use *piiu;
|
||||
char *ptr;
|
||||
unsigned nchars;
|
||||
struct msglog{
|
||||
unsigned nbytes;
|
||||
unsigned RISC_pad;
|
||||
long nbytes;
|
||||
struct sockaddr_in addr;
|
||||
};
|
||||
struct msglog *pmsglog;
|
||||
@@ -1024,7 +1030,7 @@ struct ioc_in_use *piiu;
|
||||
* log the msg size
|
||||
*/
|
||||
rcvb->stk += status;
|
||||
pmsglog->nbytes = (unsigned long) status;
|
||||
pmsglog->nbytes = (long) status;
|
||||
#ifdef DEBUG
|
||||
printf("recieved a udp reply of %d bytes\n",byte_cnt);
|
||||
#endif
|
||||
@@ -1048,7 +1054,7 @@ struct ioc_in_use *piiu;
|
||||
|
||||
pmsglog = (struct msglog *) rcvb->buf;
|
||||
while(pmsglog < (struct msglog *)&rcvb->buf[rcvb->stk]){
|
||||
unsigned long msgcount;
|
||||
long msgcount;
|
||||
|
||||
/* post message to the user */
|
||||
msgcount = pmsglog->nbytes;
|
||||
@@ -1056,7 +1062,7 @@ struct ioc_in_use *piiu;
|
||||
&msgcount,
|
||||
&pmsglog->addr.sin_addr,
|
||||
piiu);
|
||||
if(msgcount){
|
||||
if(msgcount != 0){
|
||||
printf( "CA: UDP alignment problem %d\n",
|
||||
msgcount);
|
||||
}
|
||||
@@ -1203,12 +1209,25 @@ struct ioc_in_use *piiu;
|
||||
FD_CLR(piiu->sock_chan, &readch);
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Mark all of their channels disconnected
|
||||
* prior to calling handlers incase the
|
||||
* handler tries to use a channel before
|
||||
* I mark it disconnected.
|
||||
*/
|
||||
chix = (chid) &piiu->chidlist.node.next;
|
||||
while(chix = (chid) chix->node.next){
|
||||
chix->type = TYPENOTCONN;
|
||||
chix->count = 0;
|
||||
chix->state = cs_prev_conn;
|
||||
chix->paddr = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* call their connection handler as required
|
||||
*/
|
||||
chix = (chid) &piiu->chidlist.node.next;
|
||||
while(chix = (chid) chix->node.next){
|
||||
if(chix->connection_func){
|
||||
args.chid = chix;
|
||||
args.op = CA_OP_CONN_DOWN;
|
||||
@@ -1234,6 +1253,9 @@ struct ioc_in_use *piiu;
|
||||
ECA_DISCONN,
|
||||
host_from_addr(&piiu->sock_addr.sin_addr));
|
||||
|
||||
if(piiu == &iiu[BROADCAST_IIU]){
|
||||
ca_signal(ECA_INTERNAL, "Unable to perform UDP broadcast\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+22
-15
@@ -16,6 +16,7 @@
|
||||
/* .05 082791 joh declaration of ca_request_event() */
|
||||
/* .06 082791 joh added send message in progress flag */
|
||||
/* .07 091691 joh moved channel_state enum to cadef.h for export */
|
||||
/* .08 102991 joh added sprintf buffer */
|
||||
/* */
|
||||
/*_begin */
|
||||
/************************************************************************/
|
||||
@@ -41,30 +42,34 @@
|
||||
#ifndef INCiocinfh
|
||||
#define INCiocinfh
|
||||
|
||||
#define DONT_COMPILE @@@@ dont compile in this case @@@@
|
||||
|
||||
#if defined(UNIX)
|
||||
# include <sys/types.h>
|
||||
# include <netinet/in.h>
|
||||
#elif defined(VMS)
|
||||
# include <ssdef>
|
||||
# include <sys/types.h>
|
||||
# include <netinet/in.h>
|
||||
#elif defined(vxWorks)
|
||||
# ifdef V5_vxWorks
|
||||
# include <vxTypes.h>
|
||||
# else
|
||||
# include <types.h>
|
||||
# endif
|
||||
# include <in.h>
|
||||
#else
|
||||
DONT_COMPILE
|
||||
#endif
|
||||
|
||||
#ifndef INClstLibh
|
||||
# include <lstLib.h>
|
||||
#endif
|
||||
|
||||
#ifndef _TYPES_
|
||||
# include <types.h>
|
||||
#endif
|
||||
|
||||
#ifndef __IN_HEADER__
|
||||
# include <in.h>
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# include <ssdef>
|
||||
#endif
|
||||
|
||||
#ifndef INCos_depenh
|
||||
# include <os_depen.h>
|
||||
#endif
|
||||
|
||||
#define DONT_COMPILE @@@@ dont compile in this case @@@@
|
||||
|
||||
|
||||
|
||||
/* throw out requests prior to last ECA_TIMEOUT from ca_pend */
|
||||
#define VALID_MSG(PIIU) (piiu->read_seq == piiu->cur_read_seq)
|
||||
@@ -133,6 +138,7 @@ typedef unsigned long ca_time;
|
||||
#define fd_register_arg (ca_static->ca_fd_register_arg)
|
||||
#define post_msg_active (ca_static->ca_post_msg_active)
|
||||
#define send_msg_active (ca_static->ca_send_msg_active)
|
||||
#define sprintf_buf (ca_static->ca_sprintf_buf)
|
||||
|
||||
#if defined(UNIX)
|
||||
# define readch (ca_static->ca_readch)
|
||||
@@ -172,6 +178,7 @@ struct ca_static{
|
||||
unsigned short ca_send_msg_active;
|
||||
short ca_cast_available;
|
||||
struct in_addr ca_castaddr;
|
||||
char ca_sprintf_buf[128];
|
||||
#if defined(UNIX)
|
||||
fd_set ca_readch;
|
||||
#elif defined(VMS)
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
#elif defined(vxWorks)
|
||||
# ifndef INCvxWorksh
|
||||
# include <vxWorks.h>
|
||||
# endif
|
||||
# ifndef INCfast_lockh
|
||||
# include <fast_lock.h>
|
||||
# endif
|
||||
|
||||
+23
-10
@@ -49,18 +49,31 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <lstLib.h>
|
||||
#ifdef VMS
|
||||
#include <stsdef.h>
|
||||
#if defined(VMS)
|
||||
# include <stsdef.h>
|
||||
# include <errno.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <sys/ioctl.h>
|
||||
#elif defined(UNIX)
|
||||
# include <errno.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
# include <sys/ioctl.h>
|
||||
#elif defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# include <errno.h>
|
||||
# include <types.h>
|
||||
# include <socket.h>
|
||||
# include <in.h>
|
||||
# include <ioctl.h>
|
||||
#else
|
||||
@@@@ dont compile @@@@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <types.h>
|
||||
#include <socket.h>
|
||||
#include <in.h>
|
||||
#include <ioctl.h>
|
||||
|
||||
#include <lstLib.h>
|
||||
#include <iocmsg.h>
|
||||
#include <os_depen.h>
|
||||
|
||||
|
||||
+60
-40
@@ -25,6 +25,7 @@
|
||||
/* problems with duplicate port assigned to */
|
||||
/* client after reboot go away */
|
||||
/* 072391 joh added event locking for vxWorks */
|
||||
/* 100391 joh added missing ntohs() for the VAX */
|
||||
/* */
|
||||
/*_begin */
|
||||
/************************************************************************/
|
||||
@@ -47,25 +48,32 @@
|
||||
/************************************************************************/
|
||||
/*_end */
|
||||
|
||||
#ifdef VMS
|
||||
#include <stsdef.h>
|
||||
#if defined(VMS)
|
||||
# include <sys/types.h>
|
||||
# include <stsdef.h>
|
||||
#elif defined(UNIX)
|
||||
# include <sys/types.h>
|
||||
# include <stdio.h>
|
||||
#elif defined(vxWorks)
|
||||
# include <vxWorks.h>
|
||||
# ifdef V5_vxWorks
|
||||
# include <vxTypes.h>
|
||||
# else
|
||||
# include <types.h>
|
||||
# endif
|
||||
#else
|
||||
@@@@ dont compile @@@@
|
||||
#endif
|
||||
|
||||
#ifdef UNIX
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include <os_depen.h>
|
||||
#include <cadef.h>
|
||||
#include <net_convert.h>
|
||||
#include <db_access.h>
|
||||
#include <iocmsg.h>
|
||||
#include <iocinf.h>
|
||||
|
||||
#include <vxWorks.h>
|
||||
|
||||
#include <types.h>
|
||||
#include <cadef.h>
|
||||
#include <net_convert.h>
|
||||
#include <db_access.h>
|
||||
#include <iocmsg.h>
|
||||
#include <iocinf.h>
|
||||
|
||||
void reconnect_channel();
|
||||
void ca_request_event();
|
||||
void reconnect_channel();
|
||||
void ca_request_event();
|
||||
|
||||
#define BUFSTAT printf("expected %d left %d\n",msgcnt,*pbufcnt);
|
||||
|
||||
@@ -79,10 +87,10 @@ void ca_request_event();
|
||||
*/
|
||||
void
|
||||
post_msg(hdrptr, pbufcnt, pnet_addr, piiu)
|
||||
register struct extmsg *hdrptr;
|
||||
register unsigned long *pbufcnt;
|
||||
struct in_addr *pnet_addr;
|
||||
struct ioc_in_use *piiu;
|
||||
register struct extmsg *hdrptr;
|
||||
register long *pbufcnt;
|
||||
struct in_addr *pnet_addr;
|
||||
struct ioc_in_use *piiu;
|
||||
{
|
||||
evid monix;
|
||||
long msgcnt;
|
||||
@@ -246,6 +254,16 @@ post_msg(hdrptr, pbufcnt, pnet_addr, piiu)
|
||||
chid chan = (chid) hdrptr->m_pciu;
|
||||
unsigned size;
|
||||
|
||||
/*
|
||||
* ignore IOC_READ_BUILDS after
|
||||
* connection occurs
|
||||
*/
|
||||
if(t_cmmd == IOC_READ_BUILD){
|
||||
if(chan->state == cs_conn){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* only count get returns if from the current
|
||||
* read seq
|
||||
@@ -294,21 +312,21 @@ post_msg(hdrptr, pbufcnt, pnet_addr, piiu)
|
||||
/*
|
||||
* ignore broadcast replies for deleted channels
|
||||
*
|
||||
* lock required for client_channel_exists()
|
||||
* lock required around use of the sprintf buffer
|
||||
*/
|
||||
LOCK;
|
||||
status = client_channel_exists(chan);
|
||||
UNLOCK;
|
||||
|
||||
if (!status) {
|
||||
char msg[64];
|
||||
|
||||
sprintf(
|
||||
msg,
|
||||
"Search reply from %s",
|
||||
sprintf_buf,
|
||||
"Chid %x Search reply from %s",
|
||||
chan,
|
||||
host_from_addr(pnet_addr));
|
||||
ca_signal(ECA_NOCHANMSG,msg);
|
||||
ca_signal(ECA_NOCHANMSG, sprintf_buf);
|
||||
break;
|
||||
}
|
||||
UNLOCK;
|
||||
|
||||
chpiiu = &iiu[chan->iocix];
|
||||
|
||||
@@ -317,13 +335,12 @@ post_msg(hdrptr, pbufcnt, pnet_addr, piiu)
|
||||
if (chpiiu->sock_addr.sin_addr.s_addr ==
|
||||
pnet_addr->s_addr) {
|
||||
printf("<Extra> ");
|
||||
#ifdef UNIX
|
||||
fflush(stdout);
|
||||
#endif
|
||||
# ifdef UNIX
|
||||
fflush(stdout);
|
||||
# endif
|
||||
} else {
|
||||
char msg[256];
|
||||
char acc[64];
|
||||
char rej[64];
|
||||
char acc[128];
|
||||
char rej[128];
|
||||
|
||||
sprintf(acc,
|
||||
"%s",
|
||||
@@ -332,26 +349,29 @@ post_msg(hdrptr, pbufcnt, pnet_addr, piiu)
|
||||
sprintf(rej,
|
||||
"%s",
|
||||
host_from_addr(pnet_addr));
|
||||
LOCK;
|
||||
sprintf(
|
||||
msg,
|
||||
sprintf_buf,
|
||||
"Channel: %s Accepted: %s Rejected: %s ",
|
||||
chan + 1,
|
||||
acc,
|
||||
rej);
|
||||
ca_signal(ECA_DBLCHNL, msg);
|
||||
ca_signal(ECA_DBLCHNL, sprintf_buf);
|
||||
UNLOCK;
|
||||
}
|
||||
|
||||
# ifdef IOC_READ_FOLLOWING_BUILD
|
||||
/*
|
||||
* IOC_BUILD messages allways have a
|
||||
* IOC_BUILD messages always have a
|
||||
* IOC_READ msg following. (IOC_BUILD
|
||||
* messages are sometimes followed by
|
||||
* error messages which are ignored
|
||||
* on double replies)
|
||||
*/
|
||||
if (t_cmmd == IOC_BUILD)
|
||||
if (t_cmmd == IOC_BUILD){
|
||||
msgcnt += sizeof(struct extmsg) +
|
||||
(hdrptr + 1)->m_postsize;
|
||||
|
||||
ntohs((hdrptr + 1)->m_postsize);
|
||||
}
|
||||
# endif
|
||||
break;
|
||||
}
|
||||
reconnect_channel(hdrptr, pnet_addr);
|
||||
|
||||
Reference in New Issue
Block a user