summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--code/ecp/core.c4
-rw-r--r--code/ecp/core.h4
-rw-r--r--code/ecp/timer.c2
-rw-r--r--code/ecp/vconn/vconn.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/code/ecp/core.c b/code/ecp/core.c
index d15dd16..8a40d9a 100644
--- a/code/ecp/core.c
+++ b/code/ecp/core.c
@@ -805,7 +805,7 @@ ssize_t ecp_conn_handle_kget(ECPConnection *conn, ecp_seq_t seq, unsigned char m
#endif
if ((size < 0) && !is_open) {
- ecp_conn_handler_msg_t *handler = ctx->handler[conn->type] ? ctx->handler[conn->type]->msg[ECP_MTYPE_OPEN] : NULL;
+ ecp_conn_handler_msg_t handler = ctx->handler[conn->type] ? ctx->handler[conn->type]->msg[ECP_MTYPE_OPEN] : NULL;
return handler ? handler(conn, seq, mtype, msg, size, b) : size;
}
@@ -1475,7 +1475,7 @@ int ecp_msg_defrag(ECPFragIter *iter, ecp_seq_t seq, unsigned char *msg_in, size
}
ssize_t ecp_msg_handle(ECPConnection *conn, ecp_seq_t seq, unsigned char *msg, size_t msg_size, ECP2Buffer *bufs) {
- ecp_conn_handler_msg_t *handler = NULL;
+ ecp_conn_handler_msg_t handler = NULL;
ssize_t rv = 0;
unsigned char mtype = 0;
unsigned char *content = NULL;
diff --git a/code/ecp/core.h b/code/ecp/core.h
index f3ed92a..9ffff20 100644
--- a/code/ecp/core.h
+++ b/code/ecp/core.h
@@ -152,7 +152,7 @@ struct ECPFragIter;
typedef int (*ecp_rng_t) (void *, size_t);
typedef int (*ecp_conn_handler_new_t) (struct ECPSocket *s, struct ECPConnection *p, unsigned char *msg, size_t sz, struct ECPConnection **c);
-typedef ssize_t ecp_conn_handler_msg_t (struct ECPConnection *c, ecp_seq_t s, unsigned char t, unsigned char *msg, ssize_t sz, struct ECP2Buffer *b);
+typedef ssize_t (*ecp_conn_handler_msg_t) (struct ECPConnection *c, ecp_seq_t s, unsigned char t, unsigned char *msg, ssize_t sz, struct ECP2Buffer *b);
typedef struct ECPConnection * ecp_conn_alloc_t (unsigned char t);
typedef void ecp_conn_free_t (struct ECPConnection *c);
@@ -217,7 +217,7 @@ typedef struct ECPFragIter {
} ECPFragIter;
typedef struct ECPConnHandler {
- ecp_conn_handler_msg_t *msg[ECP_MAX_MTYPE];
+ ecp_conn_handler_msg_t msg[ECP_MAX_MTYPE];
ecp_conn_create_t *conn_create;
ecp_conn_destroy_t *conn_destroy;
ecp_conn_open_t *conn_open;
diff --git a/code/ecp/timer.c b/code/ecp/timer.c
index 96a69d0..5460437 100644
--- a/code/ecp/timer.c
+++ b/code/ecp/timer.c
@@ -184,7 +184,7 @@ ecp_cts_t ecp_timer_exe(ECPSocket *sock) {
ECPConnection *conn = to_exec[i].conn;
unsigned char mtype = to_exec[i].mtype;
ecp_timer_retry_t retry = to_exec[i].retry;
- ecp_conn_handler_msg_t *handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->msg[mtype & ECP_MTYPE_MASK] : NULL;
+ ecp_conn_handler_msg_t handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->msg[mtype & ECP_MTYPE_MASK] : NULL;
if (to_exec[i].cnt > 0) {
ssize_t _rv = 0;
diff --git a/code/ecp/vconn/vconn.c b/code/ecp/vconn/vconn.c
index d7e2c02..348b2f2 100644
--- a/code/ecp/vconn/vconn.c
+++ b/code/ecp/vconn/vconn.c
@@ -106,7 +106,7 @@ static ssize_t vconn_handle_open(ECPConnection *conn, ecp_seq_t seq, unsigned ch
if (mtype & ECP_MTYPE_FLAG_REP) {
if (!conn->out) return ECP_ERR;
if (size < 0) {
- ecp_conn_handler_msg_t *handler = NULL;
+ ecp_conn_handler_msg_t handler = NULL;
while (conn->type == ECP_CTYPE_VCONN) {
ECPVConnection *conn_v = (ECPVConnection *)conn;
conn = conn_v->next;