From 0215216cb46f9054d6b98685d4a5642caff5e4e3 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 14 Sep 1993 19:24:02 +0000 Subject: [PATCH] events on action now a subroutine --- src/rsrv/camessage.c | 89 +++++++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/src/rsrv/camessage.c b/src/rsrv/camessage.c index 5378b367f..97e59df2e 100644 --- a/src/rsrv/camessage.c +++ b/src/rsrv/camessage.c @@ -44,6 +44,7 @@ * .10 joh 050692 added new routine - cas_send_heartbeat() * .11 joh 062492 dont allow flow control to turn off gets * .12 joh 090893 converted pointer to server id + * .13 joh 091493 made events on action a subroutine for debugging */ static char *sccsId = "$Id$"; @@ -125,6 +126,10 @@ LOCAL struct channel_in_use *MPTOPCIU( struct extmsg *mp ); +LOCAL void events_on_action( +struct client *client +); + LOCAL unsigned long bucketID; @@ -256,46 +261,15 @@ struct message_buffer *recv UNLOCK_CLIENT(client); } break; + case IOC_EVENTS_ON: - { - struct event_ext *pevext; - struct event_ext evext; - - client->eventsoff = FALSE; - - LOCK_CLIENT(client); - - pciu = (struct channel_in_use *) - client->addrq.node.next; - while (pciu) { - pevext = (struct event_ext *) - pciu->eventq.node.next; - while (pevext){ - - if (pevext->modified) { - evext = *pevext; - evext.send_lock = FALSE; - evext.get = TRUE; - read_reply( - &evext, - &pciu->addr, - TRUE, - NULL); - pevext->modified = FALSE; - } - pevext = (struct event_ext *) - pevext->node.next; - } - - pciu = (struct channel_in_use *) - pciu->node.next; - } - UNLOCK_CLIENT(client); + events_on_action(client); break; - } + case IOC_EVENTS_OFF: client->eventsoff = TRUE; break; + case IOC_READ_SYNC: read_sync_reply(mp, client); break; @@ -376,6 +350,51 @@ struct message_buffer *recv return OK; } + +/* + * + * events_on_action() + * + */ +LOCAL void events_on_action( +struct client *client +) +{ + struct channel_in_use *pciu; + struct event_ext *pevext; + struct event_ext evext; + + client->eventsoff = FALSE; + + LOCK_CLIENT(client); + + pciu = (struct channel_in_use *) + client->addrq.node.next; + while (pciu) { + pevext = (struct event_ext *) + pciu->eventq.node.next; + while (pevext){ + + if (pevext->modified) { + evext = *pevext; + evext.send_lock = FALSE; + evext.get = TRUE; + read_reply( + &evext, + &pciu->addr, + TRUE, + NULL); + pevext->modified = FALSE; + } + pevext = (struct event_ext *) + pevext->node.next; + } + + pciu = (struct channel_in_use *) + pciu->node.next; + } + UNLOCK_CLIENT(client); +} /*