diff options
Diffstat (limited to 'pfinet')
-rw-r--r-- | pfinet/socket-ops.c | 17 |
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; |