From 5afe15b354c2b7818924110f0a2d580f0f970001 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 21 Mar 2018 05:57:15 +0100 Subject: rbuf code refactor --- code/ecp/rbuf_send.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'code/ecp/rbuf_send.c') diff --git a/code/ecp/rbuf_send.c b/code/ecp/rbuf_send.c index 975306a..82c4272 100644 --- a/code/ecp/rbuf_send.c +++ b/code/ecp/rbuf_send.c @@ -235,6 +235,14 @@ void ecp_rbuf_send_destroy(ECPConnection *conn) { conn->rbuf.send = NULL; } +int ecp_rbuf_send_start(ECPConnection *conn) { + ECPRBSend *buf = conn->rbuf.send; + + if (buf == NULL) return ECP_ERR; + + return ecp_rbuf_start(&buf->rbuf, conn->seq_out); +} + int ecp_rbuf_send_set_wsize(ECPConnection *conn, ecp_win_t size) { ECPRBSend *buf = conn->rbuf.send; @@ -254,15 +262,7 @@ int ecp_rbuf_send_set_wsize(ECPConnection *conn, ecp_win_t size) { return ECP_OK; } -int ecp_rbuf_send_start(ECPConnection *conn) { - ECPRBSend *buf = conn->rbuf.send; - - if (buf == NULL) return ECP_ERR; - - return ecp_rbuf_start(&buf->rbuf, conn->seq_out); -} - -int ecp_rbuf_flush(ECPConnection *conn) { +int ecp_rbuf_send_flush(ECPConnection *conn) { ECPRBSend *buf = conn->rbuf.send; ecp_seq_t seq; -- cgit v1.2.3