From 38e2385f5846860916f8880d818b3b024b8c7dd9 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 14 Aug 2017 19:56:24 +0200 Subject: msgq implementation --- code/core/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'code/core/core.c') diff --git a/code/core/core.c b/code/core/core.c index 25680f3..d890291 100644 --- a/code/core/core.c +++ b/code/core/core.c @@ -1278,9 +1278,9 @@ ssize_t ecp_send(ECPConnection *conn, unsigned char *payload, size_t payload_siz ssize_t ecp_receive(ECPConnection *conn, unsigned char mtype, unsigned char *msg, size_t msg_size, unsigned int timeout) { #ifdef ECP_WITH_MSGQ - pthread_mutex_lock(&conn->mutex); + pthread_mutex_lock(&conn->rbuf.recv->msgq.mutex); ssize_t rv = ecp_conn_msgq_pop(conn, mtype, msg, msg_size, timeout); - pthread_mutex_unlock(&conn->mutex); + pthread_mutex_unlock(&conn->rbuf.recv->msgq.mutex); return rv; #else return ECP_ERR_NOT_IMPLEMENTED; -- cgit v1.2.3