From 0c22d38d55966ce592ea8db1f844e9cd8471761e Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 2 Oct 2001 17:09:56 +0000 Subject: [PATCH] return "not connected" before "no write access" for put --- src/ca/nciu.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ca/nciu.cpp b/src/ca/nciu.cpp index a582cdd37..e46d83495 100644 --- a/src/ca/nciu.cpp +++ b/src/ca/nciu.cpp @@ -233,6 +233,12 @@ void nciu::stringVerify ( const char *pStr, const unsigned count ) void nciu::write ( unsigned type, arrayElementCount countIn, const void *pValue ) { + // make sure that they get this and not "no write access" + // if disconnected + if ( ! this->f_connected ) { + throw notConnected(); + } + if ( ! this->accessRightState.writePermit() ) { throw noWriteAccess(); } @@ -251,6 +257,12 @@ void nciu::write ( unsigned type, cacChannel::ioStatus nciu::write ( unsigned type, arrayElementCount countIn, const void *pValue, cacWriteNotify ¬ify, ioid *pId ) { + // make sure that they get this and not "no write access" + // if disconnected + if ( ! this->f_connected ) { + throw notConnected(); + } + if ( ! this->accessRightState.writePermit() ) { throw noWriteAccess(); }