use new socl length typedef from osiSock.h

This commit is contained in:
Jeff Hill
2000-10-12 20:43:26 +00:00
parent 8022b3f9cb
commit fe3aef6841
2 changed files with 7 additions and 7 deletions

View File

@@ -251,7 +251,7 @@ inBuf::fillCondition casDGIntfIO::osdRecv(char *pBufIn, bufSizeT size,
fillParameter parm, bufSizeT &actualSize, caNetAddr &fromOut)
{
int status;
int addrSize;
osiSocklen_t addrSize;
sockaddr addr;
SOCKET sockThisTime;
@@ -262,7 +262,7 @@ inBuf::fillCondition casDGIntfIO::osdRecv(char *pBufIn, bufSizeT size,
sockThisTime = this->sock;
}
addrSize = sizeof (addr);
addrSize = ( osiSocklen_t ) sizeof (addr);
status = recvfrom (this->sock, pBufIn, size, 0,
&addr, &addrSize);
if (status<=0) {

View File

@@ -24,7 +24,7 @@ casIntfIO::casIntfIO (const caNetAddr &addrIn) :
{
int yes = TRUE;
int status;
int addrSize;
osiSocklen_t addrSize;
bool portChange;
if ( ! osiSockAttach () ) {
@@ -97,7 +97,7 @@ casIntfIO::casIntfIO (const caNetAddr &addrIn) :
portChange = false;
}
addrSize = sizeof (this->addr);
addrSize = ( osiSocklen_t ) sizeof (this->addr);
status = getsockname (this->sock,
(struct sockaddr *)&this->addr, &addrSize);
if (status) {
@@ -148,10 +148,10 @@ casStreamOS *casIntfIO::newStreamClient(caServerI &cas) const
{
struct sockaddr newAddr;
SOCKET newSock;
int length;
osiSocklen_t length;
casStreamOS *pOS;
length = sizeof(newAddr);
length = ( osiSocklen_t ) sizeof(newAddr);
newSock = accept(this->sock, &newAddr, &length);
if (newSock==INVALID_SOCKET) {
int errnoCpy = SOCKERRNO;
@@ -161,7 +161,7 @@ casStreamOS *casIntfIO::newStreamClient(caServerI &cas) const
}
return NULL;
}
else if (sizeof(newAddr)>(size_t)length) {
else if ( sizeof (newAddr) > (size_t) length ) {
socket_close(newSock);
errlogPrintf("CAS: accept returned bad address len?\n");
return NULL;