summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-08-20 12:03:33 +0200
committerJustus Winter <justus@gnupg.org>2017-09-12 10:41:35 +0200
commit04aaffbd6353e7cec04073783cc8cbd22ac2f675 (patch)
tree85ecd649a713cff5cd9b00a0262ab93a38391d82 /libfshelp
parent47715139bb7bc8e2c94536a34207e0028a7f65b4 (diff)
libfshelp: Avoid some right diddling.
* libfshelp/translator-list.c (fshelp_set_active_translator): Avoid updating the entry if the control port is still the same.
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/translator-list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c
index 91a2c342..a3603300 100644
--- a/libfshelp/translator-list.c
+++ b/libfshelp/translator-list.c
@@ -121,7 +121,7 @@ fshelp_set_active_translator (struct port_info *pi,
}
update:
- if (MACH_PORT_VALID (active))
+ if (MACH_PORT_VALID (active) && active != t->active)
{
mach_port_t old;
err = mach_port_request_notification (mach_task_self (), active,
@@ -146,7 +146,7 @@ fshelp_set_active_translator (struct port_info *pi,
MACH_PORT_RIGHT_SEND, +1);
t->active = active;
}
- else
+ else if (! MACH_PORT_VALID (active))
{
int ok;
ok = hurd_ihash_remove (&translator_ihash, (hurd_ihash_key_t) t->name);