summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_upstream_source.c
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-03-27 19:28:54 +0100
committerAndrew Clayton <a.clayton@nginx.com>2023-03-28 16:09:48 +0100
commit404ac4219137713bfbb5ff3dafff3cceb334b24a (patch)
treedffd473748151db5f2db38e272c8d50e689d1623 /src/nxt_upstream_source.c
parent565dcbb13987d32436993827b1eac0c4eceb42fa (diff)
downloadunit-404ac4219137713bfbb5ff3dafff3cceb334b24a.tar.gz
unit-404ac4219137713bfbb5ff3dafff3cceb334b24a.tar.bz2
Remove a bunch of dead code.
This removes a bunch of unused files that would have been touched by subsequent commits that switch to using nxt_bool_t (AKA unit6_t) in structures. In auto/sources we have NXT_LIB_SRC0=" \ src/nxt_buf_filter.c \ src/nxt_job_file.c \ src/nxt_stream_module.c \ src/nxt_stream_source.c \ src/nxt_upstream_source.c \ src/nxt_http_source.c \ src/nxt_fastcgi_source.c \ src/nxt_fastcgi_record_parse.c \ \ src/nxt_mem_pool_cleanup.h \ src/nxt_mem_pool_cleanup.c \ " None of these seem to actually be used anywhere (other than within themselves). That variable is _not_ referenced anywhere else. Also remove the unused related header files: src/nxt_buf_filter.h, src/nxt_fastcgi_source.h, src/nxt_http_source.h, src/nxt_job_file.h, src/nxt_stream_source.h and src/nxt_upstream_source.h Also, these files do not seem to be used, no mention under auto/ or build/ src/nxt_file_cache.c src/nxt_cache.c src/nxt_job_file_cache.c src/nxt_cache.h is #included in src/nxt_main.h, but AFAICT is not actually used. With all the above removed $ ./congfigure --openssl --debug --tests && make -j && make -j tests && make libnxt all builds. Buildbot passes. Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/nxt_upstream_source.c')
-rw-r--r--src/nxt_upstream_source.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/nxt_upstream_source.c b/src/nxt_upstream_source.c
deleted file mode 100644
index ee3fc21e..00000000
--- a/src/nxt_upstream_source.c
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) NGINX, Inc.
- */
-
-#include <nxt_main.h>
-
-
-static nxt_int_t nxt_upstream_header_hash_test(nxt_lvlhsh_query_t *lhq,
- void *data);
-
-
-const nxt_lvlhsh_proto_t nxt_upstream_header_hash_proto nxt_aligned(64) = {
- NXT_LVLHSH_DEFAULT,
- 0,
- nxt_upstream_header_hash_test,
- nxt_mem_lvlhsh_alloc,
- nxt_mem_lvlhsh_free,
-};
-
-
-nxt_int_t
-nxt_upstream_header_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *lh,
- const nxt_upstream_name_value_t *unv, nxt_uint_t n)
-{
- nxt_lvlhsh_query_t lhq;
-
- while (n != 0) {
- lhq.key_hash = nxt_djb_hash(unv->name, unv->len);
- lhq.replace = 1;
- lhq.key.len = unv->len;
- lhq.key.data = (u_char *) unv->name;
- lhq.value = (void *) unv;
- lhq.proto = &nxt_upstream_header_hash_proto;
- lhq.pool = mp;
-
- if (nxt_lvlhsh_insert(lh, &lhq) != NXT_OK) {
- return NXT_ERROR;
- }
-
- unv++;
- n--;
- }
-
- return NXT_OK;
-}
-
-
-static nxt_int_t
-nxt_upstream_header_hash_test(nxt_lvlhsh_query_t *lhq, void *data)
-{
- nxt_upstream_name_value_t *unv;
-
- unv = data;
-
- if (lhq->key.len == unv->len
- && nxt_memcasecmp(lhq->key.data, unv->name, unv->len) == 0)
- {
- return NXT_OK;
- }
-
- return NXT_DECLINED;
-}
-
-
-nxt_int_t
-nxt_upstream_name_value_ignore(nxt_upstream_source_t *us, nxt_name_value_t *nv)
-{
- return NXT_OK;
-}