"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "windows/winpgntc.c" between
putty-0.75.tar.gz and putty-0.76.tar.gz

About: PuTTY is a free implementation of Telnet and SSH for Windows and Unix platforms, along with an xterm terminal emulator.

winpgntc.c  (putty-0.75):winpgntc.c  (putty-0.76)
skipping to change at line 172 skipping to change at line 172
return true; return true;
} }
bool agent_exists(void) bool agent_exists(void)
{ {
return named_pipe_agent_exists() || wm_copydata_agent_exists(); return named_pipe_agent_exists() || wm_copydata_agent_exists();
} }
struct agent_pending_query { struct agent_pending_query {
struct handle *handle; struct handle *handle;
HANDLE os_handle;
strbuf *response; strbuf *response;
void (*callback)(void *, void *, int); void (*callback)(void *, void *, int);
void *callback_ctx; void *callback_ctx;
}; };
static int named_pipe_agent_accumulate_response( static int named_pipe_agent_accumulate_response(
strbuf *sb, const void *data, size_t len) strbuf *sb, const void *data, size_t len)
{ {
put_data(sb, data, len); put_data(sb, data, len);
if (sb->len >= 4) { if (sb->len >= 4) {
skipping to change at line 269 skipping to change at line 270
*out = strbuf_to_str(sb); *out = strbuf_to_str(sb);
*outlen = status; *outlen = status;
sb = NULL; sb = NULL;
pq = NULL; pq = NULL;
goto out; goto out;
} }
pq = snew(agent_pending_query); pq = snew(agent_pending_query);
pq->handle = handle_input_new(pipehandle, named_pipe_agent_gotdata, pq, 0); pq->handle = handle_input_new(pipehandle, named_pipe_agent_gotdata, pq, 0);
pipehandle = NULL; /* prevent it being closed below */ pq->os_handle = pipehandle;
pipehandle = INVALID_HANDLE_VALUE; /* prevent it being closed below */
pq->response = strbuf_new_nm(); pq->response = strbuf_new_nm();
pq->callback = callback; pq->callback = callback;
pq->callback_ctx = callback_ctx; pq->callback_ctx = callback_ctx;
goto out; goto out;
failure: failure:
*out = NULL; *out = NULL;
*outlen = 0; *outlen = 0;
pq = NULL; pq = NULL;
skipping to change at line 293 skipping to change at line 295
if (pipehandle != INVALID_HANDLE_VALUE) if (pipehandle != INVALID_HANDLE_VALUE)
CloseHandle(pipehandle); CloseHandle(pipehandle);
if (sb) if (sb)
strbuf_free(sb); strbuf_free(sb);
return pq; return pq;
} }
void agent_cancel_query(agent_pending_query *pq) void agent_cancel_query(agent_pending_query *pq)
{ {
handle_free(pq->handle); handle_free(pq->handle);
CloseHandle(pq->os_handle);
if (pq->response) if (pq->response)
strbuf_free(pq->response); strbuf_free(pq->response);
sfree(pq); sfree(pq);
} }
agent_pending_query *agent_query( agent_pending_query *agent_query(
strbuf *query, void **out, int *outlen, strbuf *query, void **out, int *outlen,
void (*callback)(void *, void *, int), void *callback_ctx) void (*callback)(void *, void *, int), void *callback_ctx)
{ {
agent_pending_query *pq = named_pipe_agent_query( agent_pending_query *pq = named_pipe_agent_query(
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)