dont allow flow control to turn off gets & added new routine cac_send_heartbeat() which so far is not called

This commit is contained in:
Jeff Hill
1992-07-28 12:44:17 +00:00
parent 6c35ce9175
commit 82d6d0efb0
2 changed files with 41 additions and 1 deletions
+36 -1
View File
@@ -42,6 +42,8 @@
* .08 joh 021492 use lstFind() to verify chanel in clear_channel()
* .09 joh 031692 dont send exeception to the client if bad msg
* detected- just disconnect instead
* .10 joh 050692 added new routine - cas_send_heartbeat()
* .11 joh 062492 dont allow flow control to turn off gets
*/
#include <vxWorks.h>
@@ -141,6 +143,7 @@ camessage(client, recv)
pevext->size = (mp->m_count - 1)
* dbr_value_size[mp->m_type] +
dbr_size[mp->m_type];
pevext->get = FALSE;
status = db_add_event(client->evuser,
MPTOPADDR(mp),
@@ -219,6 +222,7 @@ camessage(client, recv)
pevext->mp = mp;
pevext->client = client;
pevext->send_lock = TRUE;
pevext->get = TRUE;
if (mp->m_count == 1)
pevext->size = dbr_size[mp->m_type];
else
@@ -279,6 +283,7 @@ camessage(client, recv)
if (pevext->modified) {
evext = *pevext;
evext.send_lock = FALSE;
evext.get = TRUE;
read_reply(
&evext,
MPTOPADDR(&pevext->msg),
@@ -507,8 +512,9 @@ void *pfl;
/*
* If flow control is on set modified and send for later
* (only if this is not a get)
*/
if (client->eventsoff) {
if (client->eventsoff && !pevext->get) {
pevext->modified = TRUE;
return;
}
@@ -679,6 +685,7 @@ build_reply(mp, client)
evext.client = client;
evext.send_lock = FALSE;
evext.size = size;
evext.get = TRUE;
/*
* Arguments to this routine organized in favor of
@@ -825,3 +832,31 @@ FAST struct extmsg *mp;
if(mp->m_cmmd==IOC_WRITE && mp->m_type==DBF_STRING)
logMsg("CAS: The string written: %s \n",mp+1);
}
/*
*
* cac_send_heartbeat()
*
* lock must be applied while in this routine
*/
void
cas_send_heartbeat(pc)
struct client *pc;
{
FAST struct extmsg *reply;
reply = (struct extmsg *) ALLOC_MSG(pc, 0);
if(!reply){
taskSuspend(0);
}
*reply = nill_msg;
reply->m_cmmd = IOC_NOOP;
END_MSG(pc);
return;
}
+5
View File
@@ -35,8 +35,11 @@
* channel in use block
* .04 joh 071591 added ticks at last io to the client structure
* .05 joh 103191 moved lock from msg buf to client structure
* .06 joh 050692 added declaration for cac_send_heartbeat()
* .07 joh 022492 added get flag to the event ext block
*
*/
#ifndef INCLfast_lockh
#include <fast_lock.h>
#endif
@@ -103,6 +106,7 @@ struct client *client;
char modified; /* mod & ev flw ctrl enbl */
char send_lock; /* lock send buffer */
unsigned size; /* for speed */
char get; /* T: get F: monitor */
};
@@ -161,3 +165,4 @@ void cas_send_msg();
struct extmsg *cas_alloc_msg();
void rsrv_online_notify_task();
struct client *create_udp_client();
void cac_send_heartbeat();