diff --git a/src/cas/generic/casAsyncExIOI.cc b/src/cas/generic/casAsyncExIOI.cc index 2d5eb8b8e..cacdac49b 100644 --- a/src/cas/generic/casAsyncExIOI.cc +++ b/src/cas/generic/casAsyncExIOI.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.1 1996/11/02 01:01:02 jhill + * installed + * * * */ @@ -52,12 +55,6 @@ casAsyncExIOI::casAsyncExIOI(const casCtx &ctx, dgOutAddr(ctx.getClient()->fetchRespAddr()) { assert (&this->msg); - - if (this->msg.m_cmmd != CA_PROTO_CLAIM_CIU && - this->msg.m_cmmd != CA_PROTO_SEARCH) { - this->reportInvalidAsynchIO(this->msg.m_cmmd); - } - this->client.installAsyncIO(*this); } @@ -87,20 +84,25 @@ caStatus casAsyncExIOI::cbFuncAsyncIO() { caStatus status; - if (this->msg.m_cmmd == CA_PROTO_SEARCH) { + switch (this->msg.m_cmmd) { + case CA_PROTO_SEARCH: // // pass output DG address parameters // assert(this->pOutDGIntfIO); status = this->client.asyncSearchResponse(*this->pOutDGIntfIO, this->dgOutAddr.get(), this->msg, this->retVal); - } - else if (this->msg.m_cmmd == CA_PROTO_CLAIM_CIU) { + break; + + case CA_PROTO_CLAIM_CIU: status = this->client.createChanResponse(this->msg, this->retVal); - } - else { - status = S_cas_internal; - } + break; + + default: + this->reportInvalidAsynchIO(this->msg.m_cmmd); + status = S_cas_internal; + break; + } return status; } diff --git a/src/cas/generic/casAsyncRdIOI.cc b/src/cas/generic/casAsyncRdIOI.cc index a21ecbaae..7a0c817d0 100644 --- a/src/cas/generic/casAsyncRdIOI.cc +++ b/src/cas/generic/casAsyncRdIOI.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.1 1996/11/02 01:01:03 jhill + * installed + * * Revision 1.3 1996/09/04 20:13:16 jhill * initialize new member - asyncIO * @@ -60,11 +63,6 @@ casAsyncRdIOI::casAsyncRdIOI(const casCtx &ctx, casAsyncReadIO &ioIn) : assert (&this->msg); assert (&this->chan); - if (this->msg.m_cmmd != CA_PROTO_READ && - this->msg.m_cmmd != CA_PROTO_READ_NOTIFY) { - this->reportInvalidAsynchIO(this->msg.m_cmmd); - } - this->chan.installAsyncIO(*this); } @@ -123,17 +121,28 @@ caStatus casAsyncRdIOI::cbFuncAsyncIO() { caStatus status; - if (this->msg.m_cmmd == CA_PROTO_READ) { + switch (this->msg.m_cmmd) { + case CA_PROTO_READ: status = client.readResponse(&this->chan, this->msg, this->pDD, this->completionStatus); - } - else if (this->msg.m_cmmd == CA_PROTO_READ_NOTIFY) { + break; + + case CA_PROTO_READ_NOTIFY: status = client.readNotifyResponse(&this->chan, this->msg, this->pDD, this->completionStatus); - } - else { + break; + + case CA_PROTO_EVENT_ADD: + status = client.monitorResponse(&this->chan, + this->msg, this->pDD, + this->completionStatus); + break; + + default: + this->reportInvalidAsynchIO(this->msg.m_cmmd); status = S_cas_internal; + break; } return status; diff --git a/src/cas/generic/casAsyncWtIOI.cc b/src/cas/generic/casAsyncWtIOI.cc index d1a5a0b16..cb0fc4b80 100644 --- a/src/cas/generic/casAsyncWtIOI.cc +++ b/src/cas/generic/casAsyncWtIOI.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.1 1996/11/02 01:01:04 jhill + * installed + * * */ @@ -50,11 +53,6 @@ casAsyncWtIOI::casAsyncWtIOI(const casCtx &ctx, casAsyncWriteIO &ioIn) : assert (&this->msg); assert (&this->chan); - if (this->msg.m_cmmd != CA_PROTO_WRITE && - this->msg.m_cmmd != CA_PROTO_WRITE_NOTIFY) { - this->reportInvalidAsynchIO(this->msg.m_cmmd); - } - this->chan.installAsyncIO(*this); } @@ -86,17 +84,22 @@ caStatus casAsyncWtIOI::cbFuncAsyncIO() { caStatus status; - if (this->msg.m_cmmd == CA_PROTO_WRITE) { + switch (this->msg.m_cmmd) { + case CA_PROTO_WRITE: status = client.writeResponse(&this->chan, this->msg, this->completionStatus); - } - else if (this->msg.m_cmmd == CA_PROTO_WRITE_NOTIFY) { + break; + + case CA_PROTO_WRITE_NOTIFY: status = client.writeNotifyResponse(&this->chan, this->msg, this->completionStatus); - } - else { - status = S_cas_internal; - } + break; + + default: + this->reportInvalidAsynchIO(this->msg.m_cmmd); + status = S_cas_internal; + break; + } return status; }