diff options
author | Zhidao HONG <z.hong@f5.com> | 2021-08-12 17:39:00 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2021-08-12 17:39:00 +0800 |
commit | 48a9399f23b9aaa2c9e5deb8013c58313e76740e (patch) | |
tree | 91409993f842fe8e38d28d985b534a1436132285 | |
parent | 598f1493f6cbcd2a680b4f01ca7490e06092f5e2 (diff) | |
download | unit-48a9399f23b9aaa2c9e5deb8013c58313e76740e.tar.gz unit-48a9399f23b9aaa2c9e5deb8013c58313e76740e.tar.bz2 |
Introduced the generic API nxt_buf_dummy_completion().
No functional changes.
-rw-r--r-- | src/nxt_buf.h | 6 | ||||
-rw-r--r-- | src/nxt_router.c | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/nxt_buf.h b/src/nxt_buf.h index 25e8499a..5121d659 100644 --- a/src/nxt_buf.h +++ b/src/nxt_buf.h @@ -288,4 +288,10 @@ nxt_buf_cpystr(nxt_buf_t *b, const nxt_str_t *str) } +nxt_inline void +nxt_buf_dummy_completion(nxt_task_t *task, void *obj, void *data) +{ +} + + #endif /* _NXT_BUF_H_INCLIDED_ */ diff --git a/src/nxt_router.c b/src/nxt_router.c index 1aa919c2..e0029d13 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -237,8 +237,6 @@ static void nxt_router_http_request_error(nxt_task_t *task, void *obj, static void nxt_router_http_request_done(nxt_task_t *task, void *obj, void *data); -static void nxt_router_dummy_buf_completion(nxt_task_t *task, void *obj, - void *data); static void nxt_router_app_prepare_request(nxt_task_t *task, nxt_request_rpc_data_t *req_rpc_data); static nxt_buf_t *nxt_router_prepare_msg(nxt_task_t *task, @@ -2532,7 +2530,7 @@ nxt_router_listen_socket_rpc_create(nxt_task_t *task, goto fail; } - b->completion_handler = nxt_router_dummy_buf_completion; + b->completion_handler = nxt_buf_dummy_completion; b->mem.free = nxt_cpymem(b->mem.free, skcf->listen->sockaddr, size); @@ -2763,7 +2761,7 @@ nxt_router_app_rpc_create(nxt_task_t *task, goto fail; } - b->completion_handler = nxt_router_dummy_buf_completion; + b->completion_handler = nxt_buf_dummy_completion; nxt_buf_cpystr(b, &app->name); *b->mem.free++ = '\0'; @@ -3792,7 +3790,7 @@ nxt_router_access_log_open(nxt_task_t *task, nxt_router_temp_conf_t *tmcf) goto fail; } - b->completion_handler = nxt_router_dummy_buf_completion; + b->completion_handler = nxt_buf_dummy_completion; nxt_buf_cpystr(b, &access_log->path); *b->mem.free++ = '\0'; @@ -5243,12 +5241,6 @@ nxt_router_http_request_done(nxt_task_t *task, void *obj, void *data) static void -nxt_router_dummy_buf_completion(nxt_task_t *task, void *obj, void *data) -{ -} - - -static void nxt_router_app_prepare_request(nxt_task_t *task, nxt_request_rpc_data_t *req_rpc_data) { |