added locking for previous change

This commit is contained in:
Jeff Hill
1995-09-29 22:53:38 +00:00
parent 7021cd3589
commit cc20412693
2 changed files with 13 additions and 8 deletions

View File

@@ -1196,6 +1196,8 @@ void close_ioc (struct ioc_in_use *piiu)
piiuCast = NULL;
}
else {
chid *pNext;
/*
* remove IOC from the hash table
*/
@@ -1209,18 +1211,17 @@ void close_ioc (struct ioc_in_use *piiu)
* handler tries to use a channel before
* I mark it disconnected.
*/
chix = (chid) &piiu->chidlist.node.next;
while (chix = (chid) chix->node.next) {
chix = (chid) ellFirst(&piiu->chidlist);
while (chix) {
chix->state = cs_prev_conn;
chix = (chid) ellNext(&chix->node);
}
chix = (chid) &piiu->chidlist.node.next;
while (chix = (chid) chix->node.next) {
chix = (chid) ellFirst(&piiu->chidlist);
while (chix) {
pNext = (chid) ellNext(&chix->node);
cacDisconnectChannel(chix, TRUE);
}
if (piiu->chidlist.count) {
ca_signal (ECA_DISCONN,piiu->host_name_str);
chix = pNext;
}
}
@@ -1246,6 +1247,8 @@ void close_ioc (struct ioc_in_use *piiu)
ellFree (&piiu->destAddr);
ca_signal (ECA_DISCONN,piiu->host_name_str);
free (piiu);
UNLOCK;

View File

@@ -721,7 +721,9 @@ const struct in_addr *pnet_addr
* need to move the channel back to the cast IIU
* (so we will be able to reconnect)
*/
LOCK;
cacDisconnectChannel(chan, FALSE);
UNLOCK;
break;
}
default: