diff --git a/src/ca/access.c b/src/ca/access.c index d7473f92f..9fd1e3703 100644 --- a/src/ca/access.c +++ b/src/ca/access.c @@ -99,6 +99,9 @@ /************************************************************************/ /* * $Log$ + * Revision 1.107.2.1 1999/07/15 20:23:57 jhill + * fixed bug where client disconnects while waiting to send TCP + * * Revision 1.107 1998/10/27 00:43:27 jhill * eliminated warning * @@ -410,6 +413,16 @@ const void *pext if (piiu->state==iiu_connected) { (*piiu->sendBytes)(piiu); } + + /* + * if connection drops request + * cant be completed + */ + if (piiu->state!=iiu_connected) { + UNLOCK; + return ECA_DISCONNCHID; + } + bytesAvailable = cacRingBufferWriteSize(&piiu->send, contig); @@ -434,19 +447,20 @@ const void *pext UNLOCK; + LD_CA_TIME (cac_fetch_poll_period(), &itimeout); + cac_mux_io (&itimeout, FALSE); + + LOCK; + /* * if connection drops request * cant be completed */ if (piiu->state!=iiu_connected) { + UNLOCK; return ECA_DISCONNCHID; } - LD_CA_TIME (cac_fetch_poll_period(), &itimeout); - cac_mux_io (&itimeout, FALSE); - - LOCK; - bytesAvailable = cacRingBufferWriteSize( &piiu->send, contig); } diff --git a/src/ca/conn.c b/src/ca/conn.c index be3a8ca60..e18dac0c0 100644 --- a/src/ca/conn.c +++ b/src/ca/conn.c @@ -31,6 +31,9 @@ /* */ /* * $Log$ + * Revision 1.43.4.1 1999/07/15 20:33:46 jhill + * added congestion thresh to search sched alg + * * Revision 1.43 1998/11/17 02:40:56 jhill * fixed infinite loop * @@ -93,7 +96,7 @@ LOCAL int updateBeaconPeriod (bhe *pBHE); /* * checkConnWatchdogs() */ -void checkConnWatchdogs() +void checkConnWatchdogs(unsigned closeAllowed) { IIU *piiu; ca_real delay; @@ -132,7 +135,7 @@ void checkConnWatchdogs() } } - if (piiu->state==iiu_disconnected) { + if (closeAllowed && piiu->state==iiu_disconnected) { cac_close_ioc (piiu); } diff --git a/src/ca/vxWorks_depen.c b/src/ca/vxWorks_depen.c index 07722f6f4..8ad58efff 100644 --- a/src/ca/vxWorks_depen.c +++ b/src/ca/vxWorks_depen.c @@ -29,6 +29,9 @@ * Modification Log: * ----------------- * $Log$ + * Revision 1.39.4.1 1999/07/15 21:07:33 jhill + * fixed bug where client disconnects while waiting to send TCP + * * Revision 1.39 1998/09/24 21:22:55 jhill * subtle changes related to efficency when checking connection timers * @@ -983,7 +986,7 @@ void cac_recv_task(int tid) ca_process_input_queue (); - checkConnWatchdogs (); + checkConnWatchdogs (TRUE); #endif } }