author | Olivier Brunel
<jjk@jjacky.com> 2018-02-25 22:59:32 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2018-02-25 22:59:32 UTC |
parent | 5d4d196e12f086abbfd1ae1fac764f2a85dd86e5 |
src/anopa/start-stop.c | +16 | -9 |
diff --git a/src/anopa/start-stop.c b/src/anopa/start-stop.c index c1aa1c6..691dd1b 100644 --- a/src/anopa/start-stop.c +++ b/src/anopa/start-stop.c @@ -373,6 +373,8 @@ remove_fd_from_iop (int fd) } } +static void end_si_password (void); + void close_fd_for (int fd, int si) { @@ -402,15 +404,20 @@ close_fd_for (int fd, int si) { if (aa_service (si)->pi >= 0) { - struct progress *pg; - - pg = &genalloc_s (struct progress, &ga_progress)[aa_service (si)->pi]; - if (pg->is_drawn) - clear_draw (); - pg->si = -1; - pg->is_drawn = 0; - pg->aa_pg.sa.len = 0; - aa_service (si)->pi = -1; + if (si_password == si) + end_si_password (); + else + { + struct progress *pg; + + pg = &genalloc_s (struct progress, &ga_progress)[aa_service (si)->pi]; + if (pg->is_drawn) + clear_draw (); + pg->si = -1; + pg->is_drawn = 0; + pg->aa_pg.sa.len = 0; + aa_service (si)->pi = -1; + } } aa_service (si)->fd_progress = -1; }