#include "rx/rx_kcommon.h"
-#include "rx/rx_packet.h"
#include "rx/rx_atomic.h"
+#include "rx/rx_internal.h"
+#include "rx/rx_packet.h"
#include "rx/rx_stats.h"
#ifdef AFS_DARWIN80_ENV
afs_int32 savelen; /* was using rlen but had aliasing problems */
size_t nbytes, resid, noffset;
+ /* we stopped rx but the socket isn't closed yet */
+ if (!rxi_IsRunning())
+ return;
+
+ /* See if a check for additional packets was issued */
+ rx_CheckPackets();
+
p = rxi_AllocPacket(RX_PACKET_CLASS_RECEIVE);
rx_computelen(p, tlen);
rx_SetDataSize(p, tlen); /* this is the size of the user data area */
osi_NetReceive(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
int nvecs, int *alength)
{
+ int i;
+ struct iovec iov[RX_MAXIOVECS];
+ struct sockaddr *sa = NULL;
+ int code;
+ size_t resid;
+
+ int haveGlock = ISAFS_GLOCK();
+
#ifdef AFS_DARWIN80_ENV
socket_t asocket = (socket_t)so;
struct msghdr msg;
#else
struct socket *asocket = (struct socket *)so;
struct uio u;
+ memset(&u, 0, sizeof(u));
#endif
- int i;
- struct iovec iov[RX_MAXIOVECS];
- struct sockaddr *sa = NULL;
- int code;
- size_t resid;
-
- int haveGlock = ISAFS_GLOCK();
+ memset(&iov, 0, sizeof(iov));
/*AFS_STATCNT(osi_NetReceive); */
if (nvecs > RX_MAXIOVECS)
osi_NetSend(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
int nvecs, afs_int32 alength, int istack)
{
+ afs_int32 code;
+ int i;
+ struct iovec iov[RX_MAXIOVECS];
+ int haveGlock = ISAFS_GLOCK();
#ifdef AFS_DARWIN80_ENV
socket_t asocket = (socket_t)so;
struct msghdr msg;
#else
struct socket *asocket = (struct socket *)so;
struct uio u;
+ memset(&u, 0, sizeof(u));
#endif
- afs_int32 code;
- int i;
- struct iovec iov[RX_MAXIOVECS];
- int haveGlock = ISAFS_GLOCK();
+ memset(&iov, 0, sizeof(iov));
AFS_STATCNT(osi_NetSend);
if (nvecs > RX_MAXIOVECS)