From 1a7e79ace11cacf4b8e09e783c7c154d5fd76d19 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 1 Aug 2002 20:27:35 +0000 Subject: [PATCH] fixed version header wasnt pushed into the stream at the correct place --- src/cas/generic/casDGClient.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cas/generic/casDGClient.cc b/src/cas/generic/casDGClient.cc index 64ae05d21..135db94f9 100644 --- a/src/cas/generic/casDGClient.cc +++ b/src/cas/generic/casDGClient.cc @@ -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 (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) {