diff options
| author | Uros Majstorovic <majstor@majstor.org> | 2020-06-06 14:40:16 +0200 | 
|---|---|---|
| committer | Uros Majstorovic <majstor@majstor.org> | 2020-06-06 14:40:16 +0200 | 
| commit | 6ec81884f4c22f789a7b77f7eb77e01ada971464 (patch) | |
| tree | 5c0fa7daa6e534b13dccf367cad261c250453350 | |
| parent | ae52e2507afb2dcb43424ddf96067b5da52f20ee (diff) | |
ecp_conn_create_t/ecp_conn_destroy_t/ecp_conn_open_t/ecp_conn_close_t typedefs fixed
| -rw-r--r-- | code/ecp/core.c | 10 | ||||
| -rw-r--r-- | code/ecp/core.h | 16 | 
2 files changed, 13 insertions, 13 deletions
| diff --git a/code/ecp/core.c b/code/ecp/core.c index 8a40d9a..ae5eca1 100644 --- a/code/ecp/core.c +++ b/code/ecp/core.c @@ -593,10 +593,10 @@ int ecp_conn_close(ECPConnection *conn, ecp_cts_t timeout) {  #endif      if (conn->out) { -        ecp_conn_close_t *handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->conn_close : NULL; +        ecp_conn_close_t handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->conn_close : NULL;          if (handler) handler(conn);      } else { -        ecp_conn_destroy_t *handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->conn_destroy : NULL; +        ecp_conn_destroy_t handler = conn->sock->ctx->handler[conn->type] ? conn->sock->ctx->handler[conn->type]->conn_destroy : NULL;          if (handler) handler(conn);          if (conn->parent) {  #ifdef ECP_WITH_PTHREAD @@ -691,8 +691,8 @@ int ecp_conn_handle_new(ECPSocket *sock, ECPConnection *parent, unsigned char *p      ECPConnection *conn = NULL;      int rv = ECP_OK;      unsigned char ctype = 0; -    ecp_conn_create_t *handle_create = NULL; -    ecp_conn_destroy_t *handle_destroy = NULL; +    ecp_conn_create_t handle_create = NULL; +    ecp_conn_destroy_t handle_destroy = NULL;      if (payload_size < 1) return ECP_ERR; @@ -814,7 +814,7 @@ ssize_t ecp_conn_handle_kget(ECPConnection *conn, ecp_seq_t seq, unsigned char m          int rv = ecp_conn_dhkey_new_pub(conn, msg[0], msg+1);          if (!rv && !is_open) { -            ecp_conn_open_t *conn_open = ctx->handler[conn->type] ? ctx->handler[conn->type]->conn_open : NULL; +            ecp_conn_open_t conn_open = ctx->handler[conn->type] ? ctx->handler[conn->type]->conn_open : NULL;              if (conn_open) {                  ssize_t _rv = conn_open(conn);                  if (_rv < 0) rv = _rv; diff --git a/code/ecp/core.h b/code/ecp/core.h index 946213d..7ab116e 100644 --- a/code/ecp/core.h +++ b/code/ecp/core.h @@ -156,10 +156,10 @@ typedef ssize_t (*ecp_conn_handler_msg_t) (struct ECPConnection *c, ecp_seq_t s,  typedef struct ECPConnection * (*ecp_conn_alloc_t) (unsigned char t);  typedef void (*ecp_conn_free_t) (struct ECPConnection *c); -typedef int ecp_conn_create_t (struct ECPConnection *c, unsigned char *msg, size_t sz); -typedef void ecp_conn_destroy_t (struct ECPConnection *c); -typedef ssize_t ecp_conn_open_t (struct ECPConnection *c); -typedef void ecp_conn_close_t (struct ECPConnection *c); +typedef int (*ecp_conn_create_t) (struct ECPConnection *c, unsigned char *msg, size_t sz); +typedef void (*ecp_conn_destroy_t) (struct ECPConnection *c); +typedef ssize_t (*ecp_conn_open_t) (struct ECPConnection *c); +typedef void (*ecp_conn_close_t) (struct ECPConnection *c);  typedef struct ECPBuffer {      unsigned char *buffer; @@ -218,10 +218,10 @@ typedef struct ECPFragIter {  typedef struct ECPConnHandler {      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; -    ecp_conn_close_t *conn_close; +    ecp_conn_create_t conn_create; +    ecp_conn_destroy_t conn_destroy; +    ecp_conn_open_t conn_open; +    ecp_conn_close_t conn_close;  } ECPConnHandler;  typedef struct ECPSockCTable { | 
