diff options
author | Uros Majstorovic <majstor@majstor.org> | 2017-12-06 07:17:24 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2017-12-06 07:17:24 +0100 |
commit | 848f44266dd4b9213af632d55747d66f03881422 (patch) | |
tree | 2f1a348e6e5c77760bbbec8d2ec54e89cedc7e66 /code/core/timer.c | |
parent | 028af540a2d856bccc84d3f5e3e8d3517105e411 (diff) |
refactoring for memory limited systems
Diffstat (limited to 'code/core/timer.c')
-rw-r--r-- | code/core/timer.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/code/core/timer.c b/code/core/timer.c index 9d2569e..691f75c 100644 --- a/code/core/timer.c +++ b/code/core/timer.c @@ -32,8 +32,6 @@ int ecp_timer_item_init(ECPTimerItem *ti, ECPConnection *conn, unsigned char mty ti->timeout = timeout; ti->abstime = 0; ti->retry = NULL; - ti->pld = NULL; - ti->pld_size = 0; return ECP_OK; } @@ -186,8 +184,6 @@ ecp_cts_t ecp_timer_exe(ECPSocket *sock) { int rv = ECP_OK; ECPConnection *conn = to_exec[i].conn; unsigned char mtype = to_exec[i].mtype; - unsigned char *pld = to_exec[i].pld; - unsigned char pld_size = to_exec[i].pld_size; 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; @@ -197,13 +193,10 @@ ecp_cts_t ecp_timer_exe(ECPSocket *sock) { if (retry) { _rv = retry(conn, to_exec+i); if (_rv < 0) rv = _rv; - } else { - _rv = ecp_pld_send_wtimer(conn, to_exec+i, pld, pld_size); - if (_rv < 0) rv = _rv; } - if (rv && (rv != ECP_ERR_CLOSED) && handler) handler(conn, 0, mtype, NULL, rv); + if (rv && (rv != ECP_ERR_CLOSED) && handler) handler(conn, 0, mtype, NULL, rv, NULL); } else if (handler) { - handler(conn, 0, mtype, NULL, ECP_ERR_TIMEOUT); + handler(conn, 0, mtype, NULL, ECP_ERR_TIMEOUT, NULL); } #ifdef ECP_WITH_PTHREAD |