diff options
author | Miles Bader <miles@gnu.org> | 1995-07-22 16:57:48 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-07-22 16:57:48 +0000 |
commit | 77ad21c2d3a5780bc71184423de9b20f977fa293 (patch) | |
tree | 0c3c67c25a80ff8ef538417e2bd38479fff21421 /pflocal | |
parent | 9d85214faa0184364faade1253f389c4c7145f65 (diff) |
Formerly socket.c.~14~
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/socket.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c index a45bb475..10736281 100644 --- a/pflocal/socket.c +++ b/pflocal/socket.c @@ -30,9 +30,19 @@ error_t S_socket_connect2 (struct sock_user *user1, struct sock_user *user2) { + error_t err; + if (!user1 || !user2) return EOPNOTSUPP; - return sock_connect (user1->sock, user2->sock); + + err = sock_connect (user1->sock, user2->sock); + + /* Since USER2 isn't in the receiver position in the rpc, we get a send + right for it (although we only use the receive right with the same + name); be sure it's deallocated! */ + mach_port_deallocate (mach_task_self (), user2->pi.port_right); + + return err; } /* Make sure we have a queue to listen on. */ |