From 75f0fb2b0c44bf69fc0aa9241a988c793ae0cb06 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 29 Sep 1995 22:13:05 +0000 Subject: [PATCH] allow server to refuse to create a channel without a client disconnect --- src/ca/service.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/ca/service.c b/src/ca/service.c index 926bd1363..ed1f66965 100644 --- a/src/ca/service.c +++ b/src/ca/service.c @@ -263,8 +263,6 @@ const struct in_addr *pnet_addr &piiu->curMsg.m_available); UNLOCK; if(!monix){ - ca_signal(ECA_INTERNAL, - "bad client write io id from server"); break; } @@ -313,8 +311,6 @@ const struct in_addr *pnet_addr &piiu->curMsg.m_available); UNLOCK; if(!monix){ - ca_signal(ECA_INTERNAL, - "bad client read notify io id from server"); break; } @@ -384,8 +380,6 @@ const struct in_addr *pnet_addr &piiu->curMsg.m_available); UNLOCK; if(!monix){ - ca_signal(ECA_INTERNAL, - "bad client event id from server"); break; } @@ -465,8 +459,6 @@ const struct in_addr *pnet_addr &piiu->curMsg.m_available); UNLOCK; if(!pIOBlock){ - ca_signal(ECA_INTERNAL, - "bad client read io id from server"); break; } @@ -640,9 +632,6 @@ const struct in_addr *pnet_addr if (pList) { ellDelete(pList, &monix->node); } - else { - printf ("CAC - Protocol err - no list for IO blk\n"); - } caIOBlockFree(monix); } @@ -712,6 +701,29 @@ const struct in_addr *pnet_addr reconnect_channel(piiu, chan); break; } + case IOC_CLAIM_CIU_FAILED: + { + chid chan; + + LOCK; + chan = bucketLookupItemUnsignedId( + pSlowBucket, &piiu->curMsg.m_cid); + UNLOCK; + if(!chan){ + /* + * end up here if they delete the channel + * prior to this response + */ + break; + } + + /* + * need to move the channel back to the cast IIU + * (so we will be able to reconnect) + */ + cacDisconnectChannel(chan, FALSE); + break; + } default: ca_printf("CAC: post_msg(): Corrupt cmd in msg %x\n", piiu->curMsg.m_cmmd); @@ -828,7 +840,7 @@ const struct in_addr *pnet_addr case ECA_DISCONN: /* * This indicates that the connection is tagged - * is tagged for shutdown and we are waiting for + * for shutdown and we are waiting for * it to go away. Search replies are ignored * in the interim. */ @@ -979,9 +991,6 @@ chid chan /* decrement the outstanding IO count */ CLRPENDRECV(TRUE); } - - - UNLOCK; }