summaryrefslogtreecommitdiff
path: root/code/msgq.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2017-05-23 03:49:54 +0200
committerUros Majstorovic <majstor@majstor.org>2017-05-23 03:49:54 +0200
commit7c70a430f9c708be2fcce8c9a0d8cecde7f75fc0 (patch)
tree5ea4cfa8a21be07690c28161153017b7270bc54b /code/msgq.h
parent25de5e761daab8b897a4f09ff8503e6f43c299f9 (diff)
changes for proxy
Diffstat (limited to 'code/msgq.h')
-rw-r--r--code/msgq.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/code/msgq.h b/code/msgq.h
index 0bf47b3..9d16f63 100644
--- a/code/msgq.h
+++ b/code/msgq.h
@@ -9,24 +9,24 @@
struct ECPConnection;
typedef struct ECPMessage {
- unsigned char payload[ECP_MAX_PKT];
+ unsigned char msg[ECP_MAX_MSG];
ssize_t size;
} ECPMessage;
typedef struct ECPConnMsgQ {
unsigned short empty_idx;
unsigned short occupied[ECP_MAX_CONN_MSG];
- unsigned short w_idx[ECP_MAX_PTYPE];
- unsigned short r_idx[ECP_MAX_PTYPE];
- unsigned short msg_idx[ECP_MAX_PTYPE][ECP_MAX_CONN_MSG+1];
+ unsigned short w_idx[ECP_MAX_MTYPE];
+ unsigned short r_idx[ECP_MAX_MTYPE];
+ unsigned short msg_idx[ECP_MAX_MTYPE][ECP_MAX_CONN_MSG+1];
ECPMessage msg[ECP_MAX_CONN_MSG];
pthread_mutex_t mutex;
- pthread_cond_t cond[ECP_MAX_PTYPE];
+ pthread_cond_t cond[ECP_MAX_MTYPE];
} ECPConnMsgQ;
int ecp_conn_msgq_create(struct ECPConnection *conn);
void ecp_conn_msgq_destroy(struct ECPConnection *conn);
-ssize_t ecp_conn_msgq_push(struct ECPConnection *conn, unsigned char *payload, size_t payload_size);
-ssize_t ecp_conn_msgq_pop(struct ECPConnection *conn, unsigned char ptype, unsigned char *payload, size_t payload_size, unsigned int timeout);
+ssize_t ecp_conn_msgq_push(struct ECPConnection *conn, unsigned char *msg, size_t msg_size);
+ssize_t ecp_conn_msgq_pop(struct ECPConnection *conn, unsigned char mtype, unsigned char *msg, size_t msg_size, unsigned int timeout);
#endif /* ECP_WITH_PTHREAD */ \ No newline at end of file