From d2aeb3b2f016860432a3451d04cceb4d871ff4ba Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 9 Sep 2017 17:42:01 +0000 Subject: fixed rbuf ack handle again --- code/core/core.c | 2 +- code/core/rbuf_send.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/core/core.c b/code/core/core.c index cc07042..ab4041f 100644 --- a/code/core/core.c +++ b/code/core/core.c @@ -1226,7 +1226,7 @@ ssize_t ecp_pkt_handle(ECPSocket *sock, ECPNetAddr *addr, ECPConnection *parent, #endif if (proc_size == 0) proc_size = ecp_msg_handle(conn, seq_p, payload+pld_size-cnt_size, cnt_size); - if (proc_size < 0) rv = ECP_ERR_HANDLE; + if (proc_size < 0) rv = proc_size; if (!rv) cnt_size -= proc_size; #ifdef ECP_WITH_PTHREAD diff --git a/code/core/rbuf_send.c b/code/core/rbuf_send.c index bc1c1b9..c78fecf 100644 --- a/code/core/rbuf_send.c +++ b/code/core/rbuf_send.c @@ -82,7 +82,7 @@ ssize_t ecp_rbuf_handle_ack(ECPConnection *conn, ecp_seq_t seq, unsigned char mt int rv = ECP_OK; buf = conn->rbuf.send; - if (buf == NULL) return ECP_OK; + if (buf == NULL) return size; if (size < 0) return size; if (size < rsize) return ECP_ERR; -- cgit v1.2.3