summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-28 23:44:30 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-28 23:45:40 +0100
commitcd12cc27adc2291caf5a4014eab176a17af4f5d0 (patch)
tree2000e729742c698e4f3e0fdbc7c0153f92f6deb2
parent9f2d27d4f305efae7cbd6f537940dde3581bee74 (diff)
libfshelp: Fix errno value leakv0.9.git20191228
When the last translator box contains a port to a died translator, we do not want to consider this as a whole failure. * libfshelp/translator-list.c (fshelp_get_active_translators): On mach_port_mod_refs failure, reset err to 0.
-rw-r--r--libfshelp/translator-list.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c
index 92b31dd0..63088fe9 100644
--- a/libfshelp/translator-list.c
+++ b/libfshelp/translator-list.c
@@ -219,7 +219,10 @@ fshelp_get_active_translators (char **translators,
err = mach_port_mod_refs (mach_task_self (), t->active,
MACH_PORT_RIGHT_SEND, +1);
if (err)
- continue;
+ {
+ err = 0;
+ continue;
+ }
(*controls)[*controls_count] = t->active;
(*controls_count)++;