Skip to content

Commit

Permalink
get the element size from its value memember for container types
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoqiangwang committed Nov 11, 2016
1 parent b90b7bf commit c76a239
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/cas/generic/casStrmClient.cc
Expand Up @@ -856,8 +856,20 @@ caStatus casStrmClient::monitorResponse (
casChannelI & chan, const caHdrLargeArray & msg,
const gdd & desc, const caStatus completionStatus )
{
aitUint32 elementCount = 0;
if (desc.isContainer()) {
aitUint32 index;
int gdds = gddApplicationTypeTable::app_table.mapAppToIndex
( desc.applicationType(), gddAppType_value, index );
if ( gdds ) {
return S_cas_badType;
}
elementCount = desc.getDD(index)->getDataSizeElements();
} else {
elementCount = desc.getDataSizeElements();
}
ca_uint32_t count = (msg.m_count == 0) ?
(ca_uint32_t)desc.getDataSizeElements() :
(ca_uint32_t)elementCount :
msg.m_count;

void * pPayload = 0;
Expand Down

0 comments on commit c76a239

Please sign in to comment.