A few small changes to make the PuTTY source base more usable as a
[u/mdw/putty] / terminal.c
index d712fc9..2f7527c 100644 (file)
@@ -2748,7 +2748,7 @@ static void term_out(Terminal *term)
                     * Perform an actual beep if we're not overloaded.
                     */
                    if (!term->cfg.bellovl || !term->beep_overloaded) {
-                       beep(term->frontend, term->cfg.beep);
+                       do_beep(term->frontend, term->cfg.beep);
 
                        if (term->cfg.beep == BELL_VISUAL) {
                            term_schedule_vbell(term, FALSE, 0);
@@ -6396,6 +6396,7 @@ int term_get_userpass_input(Terminal *term, prompts_t *p,
                /* Immediate abort. */
                term_data(term, 0, "\r\n", 2);
                sfree(s);
+               p->data = NULL;
                return 0; /* user abort */
              default:
                /*
@@ -6421,6 +6422,7 @@ int term_get_userpass_input(Terminal *term, prompts_t *p,
        return -1; /* more data required */
     } else {
        sfree(s);
+       p->data = NULL;
        return +1; /* all done */
     }
 }