1
1

correction of checksum for pending/buffered data

This commit was SVN r9367.
Этот коммит содержится в:
Tim Woodall 2006-03-22 16:47:12 +00:00
родитель 0f6161c6da
Коммит b09c2dc1cd

Просмотреть файл

@ -465,7 +465,10 @@ ompi_generic_simple_unpack_function( ompi_convertor_t* pConvertor,
uint32_t missing_length = element_length - pConvertor->pending_length; uint32_t missing_length = element_length - pConvertor->pending_length;
assert( pElem->elem.common.flags & DT_FLAG_DATA ); assert( pElem->elem.common.flags & DT_FLAG_DATA );
memcpy( pConvertor->pending + pConvertor->pending_length, packed_buffer, missing_length ); #if defined(CHECKSUM)
pConvertor->checksum -= OPAL_CSUM(pConvertor->pending, pConvertor->pending_length);
#endif
memcpy(pConvertor->pending + pConvertor->pending_length, packed_buffer, missing_length);
packed_buffer = pConvertor->pending; packed_buffer = pConvertor->pending;
DO_DEBUG( opal_output( 0, "unpack pending from the last unpack %d out of %d bytes\n", DO_DEBUG( opal_output( 0, "unpack pending from the last unpack %d out of %d bytes\n",
pConvertor->pending_length, ompi_ddt_basicDatatypes[pElem->elem.common.type]->size ); ); pConvertor->pending_length, ompi_ddt_basicDatatypes[pElem->elem.common.type]->size ); );
@ -554,7 +557,7 @@ ompi_generic_simple_unpack_function( ompi_convertor_t* pConvertor,
*/ */
assert (type < DT_MAX_PREDEFINED); assert (type < DT_MAX_PREDEFINED);
assert( iov_len_local < ompi_ddt_basicDatatypes[type]->size ); assert( iov_len_local < ompi_ddt_basicDatatypes[type]->size );
memcpy( pConvertor->pending, packed_buffer, iov_len_local ); MEMCPY_CSUM( pConvertor->pending, packed_buffer, iov_len_local, pConvertor );
DO_DEBUG( opal_output( 0, "Saving %d bytes for the next call\n", iov_len_local ); ); DO_DEBUG( opal_output( 0, "Saving %d bytes for the next call\n", iov_len_local ); );
pConvertor->pending_length = iov_len_local; pConvertor->pending_length = iov_len_local;
iov_len_local = 0; iov_len_local = 0;