summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-11-29 21:03:06 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-11-29 21:03:06 +0000
commit0fe4eff6f179a24c8cbb870395615133ade21b89 (patch)
treec640b780d758a1e5fc4037c33483b97ff7e063eb /pfinet
parentbdc989efcb61deb2613431789e96d3f5c8e797fe (diff)
Formerly socket-ops.c.~7~
Diffstat (limited to 'pfinet')
-rw-r--r--pfinet/socket-ops.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c
index 0ddcf24d..650343c9 100644
--- a/pfinet/socket-ops.c
+++ b/pfinet/socket-ops.c
@@ -404,12 +404,12 @@ S_socket_send (struct sock_user *user,
become_task (user);
if (addr)
- err = - (*user->sock->ops->sendto) (user->sock, data, datalen,
- user->sock->userflags, flags,
- addr->address, addr->len);
+ err = (*user->sock->ops->sendto) (user->sock, data, datalen,
+ user->sock->userflags, flags,
+ addr->address, addr->len);
else
- err = - (*user->sock->ops->send) (user->sock, data, datalen,
- user->sock->userflags, flags);
+ err = (*user->sock->ops->send) (user->sock, data, datalen,
+ user->sock->userflags, flags);
mutex_unlock (&global_lock);
@@ -417,6 +417,12 @@ S_socket_send (struct sock_user *user,
if (!err)
mach_port_deallocate (mach_task_self (), addr->pi.port_right);
+ if (err >= 0)
+ {
+ *amount = err;
+ err = 0;
+ }
+
return err;
}
@@ -445,6 +451,7 @@ S_socket_recv (struct sock_user *user,
/* For unused recvmsg interface */
*nports = 0;
+ *portstype = MACH_MSG_TYPE_COPY_SEND;
*controllen = 0;
*outflags = 0;