summaryrefslogtreecommitdiff
path: root/code/core/core.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-08-14 19:56:24 +0200
committerUros Majstorovic <majstor@majstor.org>2017-08-14 19:56:24 +0200
commit38e2385f5846860916f8880d818b3b024b8c7dd9 (patch)
tree7bb01d9c38df29b49bf87c50317ec67c61c6e2a7 /code/core/core.c
parentdb44820eb01106f7780c7126e53885e8b34c8aea (diff)
msgq implementation
Diffstat (limited to 'code/core/core.c')
-rw-r--r--code/core/core.c4
1 files changed, 2 insertions, 2 deletions
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;