diff options
author | Uros Majstorovic <majstor@majstor.org> | 2017-09-09 12:43:40 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2017-09-09 12:43:40 +0200 |
commit | 4e0c427c546a6d664642f68cc6d11f879c537d29 (patch) | |
tree | ac436ce8da05c52ee1e0e1b1a7bad1f4008c8afe /code/core/rbuf_recv.c | |
parent | 8d3e76d078cf1fd9d295391735ca4208eaa5f3de (diff) |
fragments test added
Diffstat (limited to 'code/core/rbuf_recv.c')
-rw-r--r-- | code/core/rbuf_recv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/code/core/rbuf_recv.c b/code/core/rbuf_recv.c index 5b8568e..fc2b6ab 100644 --- a/code/core/rbuf_recv.c +++ b/code/core/rbuf_recv.c @@ -219,7 +219,7 @@ int ecp_rbuf_recv_create(ECPConnection *conn, ECPRBRecv *buf, ECPRBMessage *msg, buf->ack_rate = ACK_RATE; #ifdef ECP_WITH_MSGQ - rv = ecp_conn_msgq_create(conn); + rv = ecp_conn_msgq_create(&buf->msgq); if (rv) return rv; #endif @@ -228,9 +228,14 @@ int ecp_rbuf_recv_create(ECPConnection *conn, ECPRBRecv *buf, ECPRBMessage *msg, } void ecp_rbuf_recv_destroy(ECPConnection *conn) { + ECPRBRecv *buf = conn->rbuf.recv; + + if (buf == NULL) return; #ifdef ECP_WITH_MSGQ - ecp_conn_msgq_destroy(conn); -#endif + ecp_conn_msgq_destroy(&buf->msgq); +#endif + + conn->rbuf.recv = NULL; } int ecp_rbuf_recv_set_hole(ECPConnection *conn, unsigned short hole_max) { |