Ignore:
Timestamp:
Jan 9, 2017, 11:09:38 AM (2 years ago)
Author:
jrpelegrina
Message:

Update new version: 3.15.02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • filezilla/trunk/fuentes/src/putty/windows/winhsock.c

    r130 r3185  
    1919    /* the above variable absolutely *must* be the first in this structure */
    2020
    21     HANDLE send_H, recv_H;
    22     struct handle *send_h, *recv_h;
     21    HANDLE send_H, recv_H, stderr_H;
     22    struct handle *send_h, *recv_h, *stderr_h;
    2323
    2424    /*
     
    4040    bufchain inputdata;
    4141
     42    /* Data received from stderr_H, if we have one. */
     43    bufchain stderrdata;
     44
    4245    char *error;
    4346
     
    7679}
    7780
     81static int handle_stderr(struct handle *h, void *data, int len)
     82{
     83    Handle_Socket ps = (Handle_Socket) handle_get_privdata(h);
     84
     85    if (len > 0)
     86        log_proxy_stderr(ps->plug, &ps->stderrdata, data, len);
     87
     88    return 0;
     89}
     90
    7891static void handle_sentdata(struct handle *h, int new_backlog)
    7992{
     
    102115        CloseHandle(ps->recv_H);
    103116    bufchain_clear(&ps->inputdata);
     117    bufchain_clear(&ps->stderrdata);
    104118
    105119    sfree(ps);
     
    260274}
    261275
    262 Socket make_handle_socket(HANDLE send_H, HANDLE recv_H, Plug plug,
    263                           int overlapped)
     276Socket make_handle_socket(HANDLE send_H, HANDLE recv_H, HANDLE stderr_H,
     277                          Plug plug, int overlapped)
    264278{
    265279    static const struct socket_function_table socket_fn_table = {
     
    284298    ret->frozen = UNFROZEN;
    285299    bufchain_init(&ret->inputdata);
     300    bufchain_init(&ret->stderrdata);
    286301
    287302    ret->recv_H = recv_H;
     
    289304    ret->send_H = send_H;
    290305    ret->send_h = handle_output_new(ret->send_H, handle_sentdata, ret, flags);
     306    ret->stderr_H = stderr_H;
     307    if (ret->stderr_H)
     308        ret->stderr_h = handle_input_new(ret->stderr_H, handle_stderr,
     309                                         ret, flags);
    291310
    292311    return (Socket) ret;
Note: See TracChangeset for help on using the changeset viewer.