diff options
author | Uros Majstorovic <majstor@majstor.org> | 2017-08-18 20:35:21 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2017-08-18 20:35:21 +0200 |
commit | 5d20e9bafc3571f37eb0d9b74699d023d2d3d13a (patch) | |
tree | bb26005ff3ed2564212ac84cfa336ee6e97ffb93 /code/core/timer.c | |
parent | 8f44e2151cb3f91b220c4a3393a06068d0ee7302 (diff) |
timer fixed; rbuf almost implemented
Diffstat (limited to 'code/core/timer.c')
-rw-r--r-- | code/core/timer.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/code/core/timer.c b/code/core/timer.c index 8368742..a2d3fa5 100644 --- a/code/core/timer.c +++ b/code/core/timer.c @@ -196,10 +196,9 @@ unsigned int ecp_timer_exe(ECPSocket *sock) { _rv = retry(conn, to_exec+i); if (_rv < 0) rv = _rv; } else { - _rv = ecp_pld_send(conn, pld, pld_size); + _rv = ecp_pld_send_wtimer(conn, to_exec+i, pld, pld_size); if (_rv < 0) rv = _rv; } - if (!rv) rv = ecp_timer_push(to_exec+i); if (rv && (rv != ECP_ERR_CLOSED) && handler) handler(conn, 0, mtype, NULL, rv); } else if (handler) { handler(conn, 0, mtype, NULL, ECP_ERR_TIMEOUT); @@ -224,8 +223,5 @@ ssize_t ecp_timer_send(ECPConnection *conn, ecp_timer_retry_t *send_f, unsigned if (rv) return rv; ti.retry = send_f; - rv = ecp_timer_push(&ti); - if (rv) return rv; - - return send_f(conn, NULL); + return send_f(conn, &ti); } |