Skip to content

Commit 2d609f5

Browse files
authored
open ngx_http_upstream_rbtree_lookup as api (alibaba#1868)
1 parent b856ba5 commit 2d609f5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/http/ngx_http_upstream.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ static ngx_int_t ngx_http_upstream_ssl_certificate(ngx_http_request_t *r,
209209
#if (NGX_HTTP_UPSTREAM_RBTREE)
210210
static void ngx_http_upstream_rbtree_insert_value(ngx_rbtree_node_t *temp,
211211
ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel);
212-
213-
static ngx_http_upstream_srv_conf_t *
214-
ngx_http_upstream_rbtree_lookup(ngx_http_upstream_main_conf_t *umcf,
215-
ngx_str_t *host);
216212
#endif
217213

218214
static ngx_http_upstream_header_t ngx_http_upstream_headers_in[] = {
@@ -6847,7 +6843,7 @@ ngx_http_upstream_rbtree_insert_value(ngx_rbtree_node_t *temp,
68476843
}
68486844

68496845

6850-
static ngx_http_upstream_srv_conf_t *
6846+
ngx_http_upstream_srv_conf_t *
68516847
ngx_http_upstream_rbtree_lookup(ngx_http_upstream_main_conf_t *umcf,
68526848
ngx_str_t *host)
68536849
{

src/http/ngx_http_upstream.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,12 @@ void ngx_http_upstream_check_delete_dynamic_peer(ngx_str_t *name,
504504

505505
#endif
506506

507+
#if (NGX_HTTP_UPSTREAM_RBTREE)
508+
ngx_http_upstream_srv_conf_t *
509+
ngx_http_upstream_rbtree_lookup(ngx_http_upstream_main_conf_t *umcf,
510+
ngx_str_t *host);
511+
#endif
512+
507513
extern ngx_module_t ngx_http_upstream_module;
508514
extern ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[];
509515
extern ngx_conf_bitmask_t ngx_http_upstream_ignore_headers_masks[];

0 commit comments

Comments
 (0)