コード例 #1
0
ファイル: proxy.c プロジェクト: zhangbo7364/terminal
static int sk_proxy_write_oob(Socket s, const char *data, int len) {
	Proxy_Socket ps = (Proxy_Socket) s;

	if (ps->state != PROXY_STATE_ACTIVE) {
		bufchain_clear(&ps->pending_output_data);
		bufchain_clear(&ps->pending_oob_output_data);
		bufchain_add(&ps->pending_oob_output_data, data, len);
		return len;
	}
	return sk_write_oob(ps->sub_socket, data, len);
}
コード例 #2
0
ファイル: proxy.c プロジェクト: Riatre/PuTTY
static int sk_proxy_write_oob (Socket s, const void *data, int len)
{
    ProxySocket *ps = FROMFIELD(s, ProxySocket, sockvt);

    if (ps->state != PROXY_STATE_ACTIVE) {
	bufchain_clear(&ps->pending_output_data);
	bufchain_clear(&ps->pending_oob_output_data);
	bufchain_add(&ps->pending_oob_output_data, data, len);
	return len;
    }
    return sk_write_oob(ps->sub_socket, data, len);
}
コード例 #3
0
ファイル: PROXY.C プロジェクト: TortoiseGit/TortoiseGit
static size_t sk_proxy_write_oob (Socket *s, const void *data, size_t len)
{
    ProxySocket *ps = container_of(s, ProxySocket, sock);

    if (ps->state != PROXY_STATE_ACTIVE) {
	bufchain_clear(&ps->pending_output_data);
	bufchain_clear(&ps->pending_oob_output_data);
	bufchain_add(&ps->pending_oob_output_data, data, len);
	return len;
    }
    return sk_write_oob(ps->sub_socket, data, len);
}
コード例 #4
0
ファイル: winhsock.c プロジェクト: svn2github/kitty
static void sk_handle_close(Socket s)
{
    Handle_Socket ps = (Handle_Socket) s;

    handle_free(ps->send_h);
    handle_free(ps->recv_h);
    CloseHandle(ps->send_H);
    if (ps->recv_H != ps->send_H)
        CloseHandle(ps->recv_H);
    bufchain_clear(&ps->inputdata);
    bufchain_clear(&ps->stderrdata);

    sfree(ps);
}
コード例 #5
0
ファイル: logging.c プロジェクト: frobenius/putty-nd3.x
void log_free(void *handle)
{
    struct LogContext *ctx = (struct LogContext *)handle;

    logfclose(ctx);
    bufchain_clear(&ctx->queue);
    sfree(ctx);
}
コード例 #6
0
ファイル: winhandl.c プロジェクト: Ugnis/Far-NetBox
static void handle_destroy(struct handle *h)
{
    if (h->type == HT_OUTPUT)
	bufchain_clear(&h->u.o.queued_data);
    CloseHandle(h->u.g.ev_from_main);
    CloseHandle(h->u.g.ev_to_main);
    del234(handles_by_evtomain, h);
    sfree(h);
}
コード例 #7
0
ファイル: uxproxy.c プロジェクト: Joungkyun/HPuTTY
static void sk_localproxy_close (Socket s)
{
    Local_Proxy_Socket ps = (Local_Proxy_Socket) s;

    if (ps->to_cmd >= 0) {
        del234(localproxy_by_tofd, ps);
        uxsel_del(ps->to_cmd);
        close(ps->to_cmd);
    }

    del234(localproxy_by_fromfd, ps);
    uxsel_del(ps->from_cmd);
    close(ps->from_cmd);

    bufchain_clear(&ps->pending_input_data);
    bufchain_clear(&ps->pending_output_data);
    sfree(ps);
}
コード例 #8
0
ファイル: uxser.c プロジェクト: halcy/PuTTY
static void serial_free(void *handle)
{
    Serial serial = (Serial) handle;

    serial_close(serial);

    bufchain_clear(&serial->output_data);

    sfree(serial);
}
コード例 #9
0
ファイル: winhsock.c プロジェクト: elfmz/far2l
static void sk_handle_close(Socket s)
{
    Handle_Socket ps = (Handle_Socket) s;

    #ifdef MPEXT
    // WinSCP core uses do_select as signalization of connection up/down
    do_select(ps->plug, INVALID_SOCKET, 0);
    #endif

    handle_free(ps->send_h);
    handle_free(ps->recv_h);
    CloseHandle(ps->send_H);
    if (ps->recv_H != ps->send_H)
        CloseHandle(ps->recv_H);
    bufchain_clear(&ps->inputdata);
    bufchain_clear(&ps->stderrdata);

    sfree(ps);
}
コード例 #10
0
ファイル: logging.c プロジェクト: kocicjelena/Far-NetBox
void log_free(void *handle)
{
    struct LogContext *ctx = (struct LogContext *)handle;

    logfclose(ctx);
    bufchain_clear(&ctx->queue);
    if (ctx->currlogfilename)
        filename_free(ctx->currlogfilename);
    conf_free(ctx->conf);
    sfree(ctx);
}