fixed version header wasnt pushed into the stream at the correct place

This commit is contained in:
Jeff Hill
2002-08-01 20:27:35 +00:00
parent 8a95f8b6c5
commit 1a7e79ace1

View File

@@ -522,18 +522,15 @@ caStatus casDGClient::processDG ()
status = S_cas_sendBlocked;
break;
}
// insert version header at the start of the reply message
this->sendVersion ();
cadg *pRespHdr = reinterpret_cast <cadg *> (pRaw);
//
// select the next DG in the input stream and start processing it
//
const bufSizeT reqBodySize = pReqHdr->cadg_nBytes-sizeof (*pReqHdr);
const bufSizeT reqBodySize = pReqHdr->cadg_nBytes - sizeof (*pReqHdr);
const inBufCtx inctx = this->in.pushCtx (sizeof (*pReqHdr), reqBodySize);
const inBufCtx inctx = this->in.pushCtx ( sizeof (*pReqHdr), reqBodySize);
if ( inctx.pushResult() != inBufCtx::pushCtxSuccess ) {
this->in.removeMsg ( bytesLeft );
this->out.popCtx ( outctx );
@@ -546,6 +543,9 @@ caStatus casDGClient::processDG ()
this->seqNoOfReq = 0;
this->minor_version_number = 0;
// insert version header at the start of the reply message
this->sendVersion ();
status = this->processMsg ();
dgInBytesConsumed = this->in.popCtx ( inctx );
if (dgInBytesConsumed>0) {