commit-hurd
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]