Welcome to little lamb

Code » anopa » commit 5d4d196

Fix password input on retries

author Olivier Brunel
2018-02-25 22:42:41 UTC
committer Olivier Brunel
2018-02-25 22:43:15 UTC
parent af26d2d8e73bd80bb49e14d5fb076e6619771d24

Fix password input on retries

When handling a oneshot, we forgot to unset the struct progress (s->pi),
which wasn't an issue before, but now that a service can be restarted
(via retries) it would cause issue, leading to password input not being
fully processed (not presented to the user).

src/anopa/start-stop.c +2 -0

diff --git a/src/anopa/start-stop.c b/src/anopa/start-stop.c
index 9887ae8..c1aa1c6 100644
--- a/src/anopa/start-stop.c
+++ b/src/anopa/start-stop.c
@@ -408,7 +408,9 @@ close_fd_for (int fd, int si)
                 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;
         }