mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add asynchronous callback capability to the askappend() alert box.
This was harder than verify_ssh_host_key() and askalg() put together, because: (a) askappend() can be called at any time, since it's a side effect of data-logging functions. Therefore there can be an unfinished askappend() alert at any time, and hence the OS X front end has to be prepared to _queue_ other alerts which occur during that time. (b) logging.c has to do something with data that comes in while it's waiting for an answer to askappend(). It buffers it until it knows what the user wants done with it. This involved something of a reorganisation of logging.c. [originally from svn r5344]
This commit is contained in:
11
putty.h
11
putty.h
@ -916,7 +916,16 @@ int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
||||
*/
|
||||
int askalg(void *frontend, const char *algtype, const char *algname,
|
||||
void (*callback)(void *ctx, int result), void *ctx);
|
||||
int askappend(void *frontend, Filename filename);
|
||||
/*
|
||||
* askappend can return four values:
|
||||
*
|
||||
* - 2 means overwrite the log file
|
||||
* - 1 means append to the log file
|
||||
* - 0 means cancel logging for this session
|
||||
* - -1 means please wait.
|
||||
*/
|
||||
int askappend(void *frontend, Filename filename,
|
||||
void (*callback)(void *ctx, int result), void *ctx);
|
||||
|
||||
/*
|
||||
* Exports from console.c (that aren't equivalents to things in
|
||||
|
Reference in New Issue
Block a user