rxi_ServerProc(threadID, newcall, &sock);
/* osi_Assert(sock != OSI_NULLSOCKET); */
}
- /* not reached */
- return NULL;
+ AFS_UNREACHED(return(NULL));
}
/* This is the server process request loop. The server process loop
/* osi_Assert(threadID != -1); */
/* osi_Assert(newcall != NULL); */
}
- /* not reached */
- return NULL;
+ AFS_UNREACHED(return(NULL));
}
/*
int code;
code = recvmsg(socket, msg_p, flags);
-#ifdef AFS_RXERRQ_ENV
if (code < 0) {
- while((rxi_HandleSocketError(socket)) > 0)
- ;
+ rxi_HandleSocketErrors(socket);
}
-#endif
return code;
}
int
rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags)
{
+ int err = 0;
fd_set *sfds = (fd_set *) 0;
while (sendmsg(socket, msg_p, flags) == -1) {
- int err;
#ifdef AFS_NT40_ENV
err = WSAGetLastError();
if (!(sfds = IOMGR_AllocFDSet())) {
(osi_Msg "rx failed to alloc fd_set: ");
perror("rx_sendmsg");
- return -1;
+ err = ENOMEM;
+ goto error;
}
FD_SET(socket, sfds);
}
-#ifdef AFS_RXERRQ_ENV
- while((rxi_HandleSocketError(socket)) > 0)
- ;
-#endif
#ifdef AFS_NT40_ENV
if (err)
#elif defined(AFS_LINUX22_ENV)
{
(osi_Msg "rx failed to send packet: ");
perror("rx_sendmsg");
- if (err > 0)
- return -err;
- return -1;
+ goto error;
}
while ((err = select(
#ifdef AFS_NT40_ENV
if (sfds)
IOMGR_FreeFDSet(sfds);
return 0;
+
+ error:
+ if (sfds)
+ IOMGR_FreeFDSet(sfds);
+ if (err > 0)
+ return -err;
+ return -1;
}
#endif