use new udp size constants defined by ca lib

This commit is contained in:
Jeff Hill
2000-09-26 20:32:50 +00:00
parent 725b56e81b
commit 945cd55ff2
3 changed files with 9 additions and 9 deletions

View File

@@ -46,7 +46,7 @@
// casDGClient::casDGClient()
//
casDGClient::casDGClient (caServerI &serverIn) :
casClient (serverIn, MAX_UDP+sizeof(cadg))
casClient (serverIn, MAX_UDP_RECV+sizeof(cadg))
{
}
@@ -413,9 +413,9 @@ inBuf::fillCondition casDGClient::xRecv (char *pBufIn, bufSizeT nBytesToRecv,
inBuf::fillCondition stat;
cadg *pHdr;
while (pAfter-pCurBuf >= static_cast<int>(MAX_UDP+sizeof(cadg))) {
while (pAfter-pCurBuf >= static_cast<int>(MAX_UDP_RECV+sizeof(cadg))) {
pHdr = reinterpret_cast<cadg *>(pCurBuf);
stat = this->osdRecv (reinterpret_cast<char *>(pHdr+1), MAX_UDP, parm,
stat = this->osdRecv (reinterpret_cast<char *>(pHdr+1), MAX_UDP_RECV, parm,
nDGBytesRecv, pHdr->cadg_addr);
if (stat==casFillProgress) {
pHdr->cadg_nBytes = nDGBytesRecv + sizeof(*pHdr);
@@ -458,7 +458,7 @@ caStatus casDGClient::asyncSearchResponse (const caNetAddr &outAddr,
//
void *pRaw;
const outBufCtx outctx = this->outBuf::pushCtx
(sizeof(cadg), MAX_UDP, pRaw);
(sizeof(cadg), MAX_UDP_SEND, pRaw);
if (outctx.pushResult()!=outBufCtx::pushCtxSuccess) {
return S_cas_sendBlocked;
}
@@ -500,7 +500,7 @@ caStatus casDGClient::processDG ()
// and grab the send lock
//
void *pRaw;
const outBufCtx outctx = this->outBuf::pushCtx (sizeof(cadg), MAX_UDP, pRaw);
const outBufCtx outctx = this->outBuf::pushCtx (sizeof(cadg), MAX_UDP_SEND, pRaw);
if ( outctx.pushResult() != outBufCtx::pushCtxSuccess ) {
status = S_cas_sendBlocked;
break;

View File

@@ -9,7 +9,7 @@
#include <stdio.h>
#include "casdef.h"
#include "server.h"
//
// ioBlocked::ioBlocked ()

View File

@@ -433,7 +433,7 @@ bufSizeT casDGIntfIO::optimumOutBufferSize ()
// must update client before the message size can be
// increased here
//
return MAX_UDP;
return MAX_UDP_SEND;
#else
int n;
int size;
@@ -449,11 +449,11 @@ bufSizeT casDGIntfIO::optimumOutBufferSize ()
(char *)&size,
&n);
if(status < 0 || n != sizeof(size)){
size = MAX_UDP;
size = MAX_UDP_SEND;
}
if (size<=0) {
size = MAX_UDP;
size = MAX_UDP_SEND;
}
return (bufSizeT) size;
#endif