Skip to content

Commit

Permalink
Resolver: introduced state field in ngx_resolver_srv_name_t.
Browse files Browse the repository at this point in the history
It keeps the actual state value of a DNS SRV subrequest
and can be used to report a more detailed log for
failed SRV records.
  • Loading branch information
xeioex committed Sep 29, 2016
1 parent c7a6a18 commit 833d03a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/ngx_resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3006,6 +3006,7 @@ ngx_resolver_srv_names_handler(ngx_resolver_ctx_t *cctx)
ctx->count--;

srv->ctx = NULL;
srv->state = cctx->state;

if (cctx->naddrs) {

Expand Down
1 change: 1 addition & 0 deletions src/core/ngx_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ typedef struct {
u_short port;

ngx_resolver_ctx_t *ctx;
ngx_int_t state;

ngx_uint_t naddrs;
ngx_addr_t *addrs;
Expand Down

0 comments on commit 833d03a

Please sign in to comment.