diff src/core/ngx_resolver.h @ 5921:5004210e8c78

Resolver: fixed debug event logging. In 954867a2f0a6, we switched to using resolver node as the timer event data. This broke debug event logging. Replaced now unused ngx_resolver_ctx_t.ident with ngx_resolver_node_t.ident so that ngx_event_ident() extracts something sensible when accessing ngx_resolver_node_t as ngx_connection_t.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 20 Nov 2014 15:24:42 +0300
parents 3cb3175a6fef
children 7316c57e4fe7
line wrap: on
line diff
--- a/src/core/ngx_resolver.h
+++ b/src/core/ngx_resolver.h
@@ -51,11 +51,15 @@ typedef void (*ngx_resolver_handler_pt)(
 
 
 typedef struct {
-    ngx_rbtree_node_t         node;
+    /* PTR: resolved name, A: name to resolve */
+    u_char                   *name;
+
     ngx_queue_t               queue;
 
-    /* PTR: resolved name, A: name to resolve */
-    u_char                   *name;
+    /* event ident must be after 3 pointers as in ngx_connection_t */
+    ngx_int_t                 ident;
+
+    ngx_rbtree_node_t         node;
 
 #if (NGX_HAVE_INET6)
     /* PTR: IPv6 address to resolve (IPv4 address is in rbtree node key) */
@@ -103,7 +107,7 @@ typedef struct {
     void                     *dummy;
     ngx_log_t                *log;
 
-    /* ident must be after 3 pointers */
+    /* event ident must be after 3 pointers as in ngx_connection_t */
     ngx_int_t                 ident;
 
     /* simple round robin DNS peers balancer */
@@ -143,9 +147,6 @@ struct ngx_resolver_ctx_s {
     ngx_resolver_t           *resolver;
     ngx_udp_connection_t     *udp_connection;
 
-    /* ident must be after 3 pointers */
-    ngx_int_t                 ident;
-
     ngx_int_t                 state;
     ngx_str_t                 name;