fixed bug where client disconnects while waiting to send TCP

This commit is contained in:
Jeff Hill
1999-07-15 21:07:33 +00:00
parent cb0209f493
commit a001aa24d8
3 changed files with 37 additions and 28 deletions

View File

@@ -29,6 +29,9 @@
* Modification Log:
* -----------------
* $Log$
* Revision 1.26 1997/08/04 23:37:18 jhill
* added beacon anomaly flag init/allow ip 255.255.255.255
*
* Revision 1.24 1997/06/13 09:14:26 jhill
* connect/search proto changes
*
@@ -304,7 +307,7 @@ int epicsShareAPI ca_sg_block(const CA_SYNC_GID gid, ca_real timeout)
*/
tmo.tv_sec = 0L;
tmo.tv_usec = 0L;
cac_mux_io (&tmo);
cac_mux_io (&tmo, TRUE);
status = ECA_TIMEOUT;
break;
}

View File

@@ -32,6 +32,9 @@
* cjm 20-Nov-95 Add code for gettimeofday
*
* $Log$
* Revision 1.25 1998/06/16 00:43:12 jhill
* moved code to libCom
*
* Revision 1.24 1998/04/13 19:14:35 jhill
* fixed task variable problem
*
@@ -136,7 +139,7 @@ int gettimeofday(struct timeval *tp, struct timezone *tzp)
*/
void cac_block_for_io_completion(struct timeval *pTV)
{
cac_mux_io(pTV);
cac_mux_io(pTV, TRUE);
}
@@ -169,7 +172,7 @@ void os_specific_sg_io_complete(CASG *pcasg)
*/
void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
{
cac_mux_io(pTV);
cac_mux_io(pTV, TRUE);
}

View File

@@ -29,6 +29,9 @@
* Modification Log:
* -----------------
* $Log$
* Revision 1.39 1998/09/24 21:22:55 jhill
* subtle changes related to efficency when checking connection timers
*
* Revision 1.38 1998/06/16 00:56:03 jhill
* moved code from here to libCom
*
@@ -166,7 +169,7 @@ void cac_block_for_io_completion(struct timeval *pTV)
int rate = sysClkRateGet();
#ifdef NOASYNCRECV
cac_mux_io(pTV);
cac_mux_io(pTV, TRUE);
#else
/*
* flush outputs
@@ -174,7 +177,7 @@ void cac_block_for_io_completion(struct timeval *pTV)
*/
itimeout.tv_usec = 0;
itimeout.tv_sec = 0;
cac_mux_io (&itimeout);
cac_mux_io (&itimeout, TRUE);
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
ticks = min(LOCALTICKS, ticks);
@@ -229,31 +232,31 @@ void os_specific_sg_io_complete(CASG *pcasg)
*/
void cac_block_for_sg_completion(CASG *pcasg, struct timeval *pTV)
{
struct timeval itimeout;
int ticks;
int rate = sysClkRateGet();
struct timeval itimeout;
int ticks;
int rate = sysClkRateGet();
#ifdef NOASYNCRECV
cac_mux_io(pTV);
cac_mux_io(pTV, TRUE);
#else
/*
* flush outputs
* (recv occurs in another thread)
*/
itimeout.tv_usec = 0;
itimeout.tv_sec = 0;
cac_mux_io(&itimeout);
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
ticks = min(LOCALTICKS, ticks);
semTake (pcasg->sem, ticks);
/*
* force a time update because we are not
* going to get one with a nill timeout in
* ca_mux_io()
*/
cac_gettimeval (&ca_static->currentTime);
/*
* flush outputs
* (recv occurs in another thread)
*/
itimeout.tv_usec = 0;
itimeout.tv_sec = 0;
cac_mux_io(&itimeout, TRUE);
ticks = (int) (pTV->tv_sec*rate + (pTV->tv_usec*rate)/USEC_PER_SEC);
ticks = min(LOCALTICKS, ticks);
semTake (pcasg->sem, ticks);
/*
* force a time update because we are not
* going to get one with a nill timeout in
* ca_mux_io()
*/
cac_gettimeval (&ca_static->currentTime);
#endif
}