diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-06-06 18:57:58 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-06-06 18:57:58 +0300 |
commit | d0c72e07261ac3ee57573b7f41732fab76862aee (patch) | |
tree | c59663adc63aeef81a1701dc42e70b2e27b20591 /src/nxt_application.c | |
parent | 49e9049ed2b00f2f3ce5bacd75dbc21932836a25 (diff) | |
download | unit-d0c72e07261ac3ee57573b7f41732fab76862aee.tar.gz unit-d0c72e07261ac3ee57573b7f41732fab76862aee.tar.bz2 |
C99 style declaration of connection states.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_application.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c index eedfd0c9..293807b0 100644 --- a/src/nxt_application.c +++ b/src/nxt_application.c @@ -827,16 +827,13 @@ nxt_app_delivery_handler(nxt_task_t *task, void *obj, void *data) static const nxt_event_conn_state_t nxt_app_delivery_write_state nxt_aligned(64) = { - NXT_EVENT_NO_BUF_PROCESS, - NXT_EVENT_TIMER_AUTORESET, + .ready_handler = nxt_app_delivery_ready, + .error_handler = nxt_app_delivery_error, - nxt_app_delivery_ready, - NULL, - nxt_app_delivery_error, - - nxt_app_delivery_timeout, - nxt_app_delivery_timer_value, - 0, + .timer_handler = nxt_app_delivery_timeout, + .timer_value = nxt_app_delivery_timer_value, + .timer_data = 0, + .timer_autoreset = 1, }; @@ -871,16 +868,7 @@ nxt_app_delivery_ready(nxt_task_t *task, void *obj, void *data) static const nxt_event_conn_state_t nxt_app_delivery_close_state nxt_aligned(64) = { - NXT_EVENT_NO_BUF_PROCESS, - NXT_EVENT_TIMER_NO_AUTORESET, - - nxt_app_close_request, - NULL, - NULL, - - NULL, - NULL, - 0, + .ready_handler = nxt_app_close_request, }; |