summaryrefslogtreecommitdiff
path: root/libports/transfer-right.c
diff options
context:
space:
mode:
Diffstat (limited to 'libports/transfer-right.c')
-rw-r--r--libports/transfer-right.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libports/transfer-right.c b/libports/transfer-right.c
index d5844ea2..e7b0ff55 100644
--- a/libports/transfer-right.c
+++ b/libports/transfer-right.c
@@ -1,5 +1,5 @@
/* Transfer the receive right from one port structure to another
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 2003 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -20,6 +20,7 @@
#include "ports.h"
+#include <assert.h>
#include <hurd/ihash.h>
error_t
@@ -40,7 +41,7 @@ ports_transfer_right (void *tostruct,
port = frompi->port_right;
if (port != MACH_PORT_NULL)
{
- ihash_locp_remove (frompi->bucket->htable, frompi->hentry);
+ hurd_ihash_locp_remove (&frompi->bucket->htable, frompi->hentry);
frompi->port_right = MACH_PORT_NULL;
if (frompi->flags & PORT_HAS_SENDRIGHTS)
{
@@ -53,9 +54,10 @@ ports_transfer_right (void *tostruct,
/* Destroy the existing right in TOPI. */
if (topi->port_right != MACH_PORT_NULL)
{
- ihash_locp_remove (topi->bucket->htable, topi->hentry);
+ hurd_ihash_locp_remove (&topi->bucket->htable, topi->hentry);
err = mach_port_mod_refs (mach_task_self (), topi->port_right,
MACH_PORT_RIGHT_RECEIVE, -1);
+ assert_perror (err);
if ((topi->flags & PORT_HAS_SENDRIGHTS) && !hassendrights)
{
dereftopi = 1;
@@ -75,9 +77,13 @@ ports_transfer_right (void *tostruct,
if (port)
{
- ihash_add (topi->bucket->htable, port, topi, &topi->hentry);
+ hurd_ihash_add (&topi->bucket->htable, port, topi);
if (topi->bucket != frompi->bucket)
- mach_port_move_member (mach_task_self (), port, topi->bucket->portset);
+ {
+ err = mach_port_move_member (mach_task_self (), port,
+ topi->bucket->portset);
+ assert_perror (err);
+ }
}
mutex_unlock (&_ports_lock);