replace caLimitArray with EPICS_CA_AUTO_MAX_ARRAY_BYTES

This commit is contained in:
Michael Davidsaver
2017-05-02 19:31:21 -04:00
parent 4f1b244589
commit 9fd8eec2e2
5 changed files with 11 additions and 14 deletions

View File

@@ -55,14 +55,6 @@ static const char pVersionCAC[] =
"@(#) " EPICS_VERSION_STRING
", CA Client Library " __DATE__;
// when set, respect EPICS_CA_MAX_ARRAY_BYTES
// when clear, ignore it
extern "C" {
epicsShareExtern int caLimitArray;
int caLimitArray;
epicsExportAddress(int, caLimitArray);
}
// TCP response dispatch table
const cac::pProtoStubTCP cac::tcpJumpTableCAC [] =
{
@@ -227,6 +219,10 @@ cac::cac (
throw std::bad_alloc ();
}
int caLimitArray;
if(envGetBoolConfigParam(&EPICS_CA_AUTO_MAX_ARRAY_BYTES, &caLimitArray))
caLimitArray = 0;
if(caLimitArray) {
freeListInitPvt ( &this->tcpLargeRecvBufFreeList, this->maxRecvBytesTCP, 1 );
if ( ! this->tcpLargeRecvBufFreeList ) {