From 546bb97e929f4b54c6198a2a154d4e4a8d52509f Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 13 Aug 1996 22:54:20 +0000 Subject: [PATCH] fixed little endian problem --- src/cas/generic/casDGClient.cc | 5 ++++- src/cas/generic/outBuf.cc | 10 ++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/cas/generic/casDGClient.cc b/src/cas/generic/casDGClient.cc index becd0169c..d4dc9a28c 100644 --- a/src/cas/generic/casDGClient.cc +++ b/src/cas/generic/casDGClient.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.3 1996/08/05 19:26:15 jhill + * made os specific code smaller + * * Revision 1.2 1996/06/26 21:18:52 jhill * now matches gdd api revisions * @@ -207,7 +210,7 @@ caStatus casDGClient::searchResponse(casChannelI *nullPtr, const caHdr &msg, *search_reply = msg; search_reply->m_postsize = sizeof(*pMinorVersion); search_reply->m_cid = ~0U; - search_reply->m_type = this->ctx.getServer()->serverPortNumber(); + search_reply->m_type = htons(this->ctx.getServer()->serverPortNumber()); search_reply->m_count = 0ul; /* diff --git a/src/cas/generic/outBuf.cc b/src/cas/generic/outBuf.cc index 9641ec547..1fa959491 100644 --- a/src/cas/generic/outBuf.cc +++ b/src/cas/generic/outBuf.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.1.1.1 1996/06/20 00:28:15 jhill + * ca server installation + * * */ @@ -133,16 +136,12 @@ caHdr **ppMsg void outBuf::commitMsg () { caHdr *mp; - bufSizeT size; bufSizeT extSize; bufSizeT diff; - assert (this->bufSize); - mp = (caHdr *) &this->pBuf[this->stack]; extSize = CA_MESSAGE_ALIGN(mp->m_postsize); -assert((extSize&0x7)==0); // // Guarantee that all portions of outgoing messages @@ -177,8 +176,7 @@ assert((extSize&0x7)==0); mp->m_cid = htonl (mp->m_cid); mp->m_available = htonl (mp->m_available); - size = sizeof(caHdr) + mp->m_postsize; - this->stack += size; + this->stack += sizeof(caHdr) + extSize; assert (this->stack <= this->bufSize); this->mutex.unlock();