summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/core/msgq.c5
-rw-r--r--code/core/msgq.h2
-rw-r--r--code/core/rbuf_recv.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/code/core/msgq.c b/code/core/msgq.c
index 45df608..b928a2d 100644
--- a/code/core/msgq.c
+++ b/code/core/msgq.c
@@ -59,10 +59,7 @@ void ecp_conn_msgq_destroy(ECPConnMsgQ *msgq) {
pthread_mutex_destroy(&msgq->mutex);
}
-int ecp_conn_msgq_start(ECPConnection *conn, ecp_seq_t seq) {
- ECPRBRecv *buf = conn->rbuf.recv;
- ECPConnMsgQ *msgq = buf ? &buf->msgq : NULL;
-
+int ecp_conn_msgq_start(ECPConnMsgQ *msgq, ecp_seq_t seq) {
if (msgq == NULL) return ECP_ERR;
msgq->seq_max = seq;
diff --git a/code/core/msgq.h b/code/core/msgq.h
index a98ae18..41e819b 100644
--- a/code/core/msgq.h
+++ b/code/core/msgq.h
@@ -18,7 +18,7 @@ typedef struct ECPConnMsgQ {
int ecp_conn_msgq_create(ECPConnMsgQ *msgq);
void ecp_conn_msgq_destroy(ECPConnMsgQ *msgq);
-int ecp_conn_msgq_start(struct ECPConnection *conn, ecp_seq_t seq);
+int ecp_conn_msgq_start(ECPConnMsgQ *msgq, ecp_seq_t seq);
int ecp_conn_msgq_push(struct ECPConnection *conn, ecp_seq_t seq, unsigned char mtype);
ssize_t ecp_conn_msgq_pop(struct ECPConnection *conn, unsigned char mtype, unsigned char *msg, size_t msg_size, ecp_cts_t timeout);
diff --git a/code/core/rbuf_recv.c b/code/core/rbuf_recv.c
index fc2b6ab..2217bfc 100644
--- a/code/core/rbuf_recv.c
+++ b/code/core/rbuf_recv.c
@@ -269,7 +269,7 @@ int ecp_rbuf_recv_start(ECPConnection *conn, ecp_seq_t seq) {
#ifdef ECP_WITH_MSGQ
if (buf->flags & ECP_RBUF_FLAG_MSGQ) {
- rv = ecp_conn_msgq_start(conn, seq);
+ rv = ecp_conn_msgq_start(&buf->msgq, seq);
if (rv) return rv;
}
#endif