diff options
Diffstat (limited to 'src/libnsss/nsss_switch_end.c')
-rw-r--r-- | src/libnsss/nsss_switch_end.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnsss/nsss_switch_end.c b/src/libnsss/nsss_switch_end.c index 3922721..6895dd6 100644 --- a/src/libnsss/nsss_switch_end.c +++ b/src/libnsss/nsss_switch_end.c @@ -8,10 +8,11 @@ static inline void nsss_switch_disconnect (nsss_switch_t *a) { fd_close(buffer_fd(&a->b)) ; a->b.fd = -1 ; + a->path = 0 ; } void nsss_switch_end (nsss_switch_t *a, unsigned int what) { - a->held &= ~(1U << what) ; + a->held &= ~(what & 0x7u) ; if (!a->held) nsss_switch_disconnect(a) ; } |