better test to see if a large message will fit in the old buffer

This commit is contained in:
Jeff Hill
2002-03-07 18:46:12 +00:00
parent 0b61dca8de
commit 7c4e5e5fac

View File

@@ -1051,7 +1051,7 @@ inline void insertRequestWithPayLoad (
maxBytes = 0xffffffff;
}
else {
maxBytes = MAX_TCP;
maxBytes = MAX_TCP - 16u; // allow space for protocol header
}
unsigned maxElem = ( maxBytes - dbr_size[dataType] ) / dbr_value_size[dataType];
if ( nElem >= maxElem ) {