Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngx_print_escape 函数只在 NGX_HTTP_UPSTREAM_CHECK 开启时定义 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/ngx_http_dynamic_update_upstream_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ extern ngx_uint_t ngx_http_upstream_check_add_dynamic_peer(ngx_pool_t *pool,
ngx_http_upstream_srv_conf_t *us, ngx_addr_t *peer_addr);
extern void ngx_http_upstream_check_delete_dynamic_peer(ngx_str_t *name,
ngx_addr_t *peer_addr);

static u_char *ngx_print_escape(u_char *dst, u_char *src, size_t len);
#endif

static char *ngx_http_dynamic_update_upstream_consul_server(ngx_conf_t *cf,
Expand Down Expand Up @@ -284,8 +286,6 @@ static ngx_int_t ngx_http_client_send(ngx_http_conf_client *client,
ngx_http_dynamic_update_upstream_server_t *conf_server);
static ngx_int_t ngx_http_client_recv(ngx_http_conf_client *client, char **data, int size);

static u_char *ngx_print_escape(u_char *dst, u_char *src, size_t len);

static char *ngx_http_dynamic_update_upstream_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
static ngx_int_t ngx_http_dynamic_update_upstream_show(ngx_http_request_t *r);

Expand Down Expand Up @@ -2601,6 +2601,7 @@ ngx_http_dynamic_update_upstream_del_delay_delete(ngx_event_t *event)
}


#if (NGX_HTTP_UPSTREAM_CHECK)
u_char *
ngx_print_escape(u_char *dst, u_char *src, size_t len)
{
Expand Down Expand Up @@ -2633,6 +2634,7 @@ ngx_print_escape(u_char *dst, u_char *src, size_t len)

return dst;
}
#endif


size_t
Expand Down