mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
psusan: terminate when the session is concluded.
I carefully set a 'finished' flag in the main source file on receipt of the server_instance_terminated() callback, and then I plain forgot to hook it up to the uxcliloop callback that says whether the program should carry on running each time round the main loop. Now we actually check the finished flag, and terminate the program if it's set.
This commit is contained in:
parent
7003b43963
commit
e5caabaded
@ -160,6 +160,11 @@ void server_instance_terminated(LogPolicy *lp)
|
||||
sfree(inst);
|
||||
}
|
||||
|
||||
bool psusan_continue(void *ctx, bool fd, bool cb)
|
||||
{
|
||||
return !finished;
|
||||
}
|
||||
|
||||
static bool longoptarg(const char *arg, const char *expected,
|
||||
const char **val, int *argcp, char ***argvp)
|
||||
{
|
||||
@ -299,7 +304,7 @@ int main(int argc, char **argv)
|
||||
ssh_server_start(plug, make_fd_socket(0, 1, -1, plug));
|
||||
|
||||
cli_main_loop(cliloop_no_pw_setup, cliloop_no_pw_check,
|
||||
cliloop_always_continue, NULL);
|
||||
psusan_continue, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user