1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

First half of `pageant-async' work. agent_query() is now passed a

callback function; it may return 0 to indicate that it doesn't have
an answer _yet_, in which case it will call the callback later on
when it does, or it may return 1 to indicate that it's got an answer
right now. The Windows agent_query() implementation is functionally
unchanged and still synchronous, but the Unix one is async (since
that one was really easy to do via uxsel). ssh.c copes cheerfully
with either return value, so other ports are at liberty to be sync
or async as they choose.

[originally from svn r3153]
This commit is contained in:
Simon Tatham
2003-04-28 11:41:39 +00:00
parent 2e2b6d89bd
commit f6a208fbdd
5 changed files with 246 additions and 87 deletions

14
putty.h
View File

@ -749,9 +749,19 @@ void crypto_wrapup();
#endif
/*
* Exports from pageantc.c
* Exports from pageantc.c.
*
* agent_query returns 1 for here's-a-response, and 0 for query-in-
* progress. In the latter case there will be a call to `callback'
* at some future point, passing callback_ctx as the first
* parameter and the actual reply data as the second and third.
*
* The response may be a NULL pointer (in either of the synchronous
* or asynchronous cases), which indicates failure to receive a
* response.
*/
void agent_query(void *in, int inlen, void **out, int *outlen);
int agent_query(void *in, int inlen, void **out, int *outlen,
void (*callback)(void *, void *, int), void *callback_ctx);
int agent_exists(void);
/*