[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 05/15: libfshelp: Always register dead-name notifications.
From: |
Samuel Thibault |
Subject: |
[hurd] 05/15: libfshelp: Always register dead-name notifications. |
Date: |
Sun, 19 Nov 2017 15:27:05 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 116552c075abf1d22057a608fee9d27684bcbbe5
Author: Justus Winter <address@hidden>
Date: Wed Oct 5 15:09:11 2016 +0200
libfshelp: Always register dead-name notifications.
* libfshelp/translator-list.c (fshelp_set_active_translator): Always
register dead-name notifications.
---
libfshelp/translator-list.c | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c
index 5203128..b8fe3f9 100644
--- a/libfshelp/translator-list.c
+++ b/libfshelp/translator-list.c
@@ -116,27 +116,24 @@ fshelp_set_active_translator (struct port_info *pi,
goto out;
update:
- if (active)
+ if (MACH_PORT_VALID (active))
{
- if (t->pi != pi)
- {
- mach_port_t old;
- err = mach_port_request_notification (mach_task_self (), active,
- MACH_NOTIFY_DEAD_NAME, 0,
- pi->port_right,
- MACH_MSG_TYPE_MAKE_SEND_ONCE,
- &old);
- if (err)
- goto out;
- if (old != MACH_PORT_NULL)
- mach_port_deallocate (mach_task_self (), old);
+ mach_port_t old;
+ err = mach_port_request_notification (mach_task_self (), active,
+ MACH_NOTIFY_DEAD_NAME, 0,
+ pi->port_right,
+ MACH_MSG_TYPE_MAKE_SEND_ONCE,
+ &old);
+ if (err)
+ goto out;
+ if (old != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self (), old);
- if (t->pi)
- ports_port_deref (t->pi);
+ if (t->pi)
+ ports_port_deref (t->pi);
- ports_port_ref (pi);
- t->pi = pi;
- }
+ ports_port_ref (pi);
+ t->pi = pi;
if (MACH_PORT_VALID (t->active))
mach_port_deallocate (mach_task_self (), t->active);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch dde updated (4d4175c -> e3c726d), Samuel Thibault, 2017/11/19
- [hurd] 04/15: libfshelp: Avoid useless allocations., Samuel Thibault, 2017/11/19
- [hurd] 05/15: libfshelp: Always register dead-name notifications.,
Samuel Thibault <=
- [hurd] 07/15: Normalize path of translators., Samuel Thibault, 2017/11/19
- [hurd] 09/15: libfshelp: Avoid some right diddling., Samuel Thibault, 2017/11/19
- [hurd] 08/15: libfshelp: Improve error handling., Samuel Thibault, 2017/11/19
- [hurd] 12/15: libdiskfs: Shutdown pagers on startup_dosync., Samuel Thibault, 2017/11/19
- [hurd] 10/15: libfshelp: Use node instead of name as key., Samuel Thibault, 2017/11/19
- [hurd] 06/15: libfshelp: Add function to map over all active translators., Samuel Thibault, 2017/11/19
- [hurd] 02/15: libfshelp: improve translator list, Samuel Thibault, 2017/11/19
- [hurd] 01/15: pflocal: Use default stub implementations., Samuel Thibault, 2017/11/19
- [hurd] 15/15: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2017/11/19
- [hurd] 03/15: Fix active translator registration., Samuel Thibault, 2017/11/19