From f5662bbf32b3dbf1abff412cc04dd0e5b20b49ab Mon Sep 17 00:00:00 2001 From: jad Date: Sun, 1 Nov 2015 11:43:12 +0900 Subject: [PATCH] working prototype 5 --- src/util-internal.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/util-internal.c b/src/util-internal.c index fb1d664d..27932bbc 100644 --- a/src/util-internal.c +++ b/src/util-internal.c @@ -702,17 +702,17 @@ _getdns_create_call_debugging_dict(getdns_context *context, } _getdns_sockaddr_to_dict(context, &netreq->upstream->addr, &address_debug); - if (getdns_dict_set_bindata(netreq_debug, "qname", qname)) { + if (getdns_dict_set_bindata(netreq_debug, "query_name", qname)) { getdns_dict_destroy(netreq_debug); getdns_dict_destroy(address_debug); return NULL; } - if (getdns_dict_set_int(netreq_debug, "qtype", qtype)) { + if (getdns_dict_set_int(netreq_debug, "query_type", qtype)) { getdns_dict_destroy(netreq_debug); getdns_dict_destroy(address_debug); return NULL; } - if (getdns_dict_set_dict(netreq_debug, "upstream", address_debug)) { + if (getdns_dict_set_dict(netreq_debug, "query_to", address_debug)) { getdns_dict_destroy(netreq_debug); getdns_dict_destroy(address_debug); return NULL; @@ -724,9 +724,19 @@ _getdns_create_call_debugging_dict(getdns_context *context, getdns_dict_destroy(netreq_debug); return NULL; } + if (getdns_dict_set_int(netreq_debug, "start_time", + netreq->debug_start_time)) { + getdns_dict_destroy(netreq_debug); + return NULL; + } + if (getdns_dict_set_int(netreq_debug, "end_time", + netreq->debug_end_time)) { + getdns_dict_destroy(netreq_debug); + return NULL; + } /* Only include the auth status if TLS was used */ if (netreq->upstream->transport == GETDNS_TRANSPORT_TLS) { - if (getdns_dict_util_set_string(netreq_debug, "tls_auth", + if (getdns_dict_util_set_string(netreq_debug, "tls_auth_status", netreq->debug_tls_auth_status == 0 ? "OK: Hostname matched valid cert." : "FAILED: Server not validated.")) {