catch client initiated write requests with invalid dbr types in the client library

This commit is contained in:
Jeff Hill
2006-11-18 00:52:09 +00:00
parent 4bf25982fa
commit ffb5e239f2

View File

@@ -1388,6 +1388,9 @@ void tcpiiu::writeRequest ( epicsGuard < epicsMutex > & guard, // X aCC 431
nciu &chan, unsigned type, arrayElementCount nElem, const void *pValue )
{
guard.assertIdenticalMutex ( this->mutex );
if ( INVALID_DB_REQ ( type ) ) {
throw cacChannel::badType ();
}
comQueSendMsgMinder minder ( this->sendQue, guard );
this->sendQue.insertRequestWithPayLoad ( CA_PROTO_WRITE,
type, nElem, chan.getSID(guard), chan.getCID(guard), pValue,
@@ -1405,6 +1408,9 @@ void tcpiiu::writeNotifyRequest ( epicsGuard < epicsMutex > & guard, // X aCC 43
if ( ! this->ca_v41_ok ( guard ) ) {
throw cacChannel::unsupportedByService();
}
if ( INVALID_DB_REQ ( type ) ) {
throw cacChannel::badType ();
}
comQueSendMsgMinder minder ( this->sendQue, guard );
this->sendQue.insertRequestWithPayLoad ( CA_PROTO_WRITE_NOTIFY,
type, nElem, chan.getSID(guard), io.getId(), pValue,