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:
14
putty.h
14
putty.h
@ -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);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user