Skip to content

Commit

Permalink
open ngx_http_upstream_rbtree_lookup as api
Browse files Browse the repository at this point in the history
  • Loading branch information
lhanjian committed Sep 25, 2023
1 parent 311ec04 commit 8d691d8
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 8d691d8

Please sign in to comment.