Skip to content

Commit

Permalink
open ngx_http_upstream_rbtree_lookup as api (#1868)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhanjian authored Oct 31, 2023
1 parent b856ba5 commit 2d609f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/http/ngx_http_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ static ngx_int_t ngx_http_upstream_ssl_certificate(ngx_http_request_t *r,
#if (NGX_HTTP_UPSTREAM_RBTREE)
static void ngx_http_upstream_rbtree_insert_value(ngx_rbtree_node_t *temp,
ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel);

static ngx_http_upstream_srv_conf_t *
ngx_http_upstream_rbtree_lookup(ngx_http_upstream_main_conf_t *umcf,
ngx_str_t *host);
#endif

static ngx_http_upstream_header_t ngx_http_upstream_headers_in[] = {
Expand Down Expand Up @@ -6847,7 +6843,7 @@ ngx_http_upstream_rbtree_insert_value(ngx_rbtree_node_t *temp,
}


static ngx_http_upstream_srv_conf_t *
ngx_http_upstream_srv_conf_t *
ngx_http_upstream_rbtree_lookup(ngx_http_upstream_main_conf_t *umcf,
ngx_str_t *host)
{
Expand Down
6 changes: 6 additions & 0 deletions src/http/ngx_http_upstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,12 @@ void ngx_http_upstream_check_delete_dynamic_peer(ngx_str_t *name,

#endif

#if (NGX_HTTP_UPSTREAM_RBTREE)
ngx_http_upstream_srv_conf_t *
ngx_http_upstream_rbtree_lookup(ngx_http_upstream_main_conf_t *umcf,
ngx_str_t *host);
#endif

extern ngx_module_t ngx_http_upstream_module;
extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[];
extern ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[];
Expand Down

0 comments on commit 2d609f5

Please sign in to comment.