From: W.C.A. Wijngaards Date: Fri, 8 Jan 2021 08:53:52 +0000 (+0100) Subject: - For #391: fix indentation. X-Git-Tag: release-1.13.1rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee2545d93926a8fc80ff0a0bac6df14425f32a02;p=thirdparty%2Funbound.git - For #391: fix indentation. --- diff --git a/daemon/worker.c b/daemon/worker.c index 33b70e83e..37a8e1fe0 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -546,7 +546,7 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo, edns->bits &= EDNS_DO; if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, msg->rep, (int)(flags&LDNS_RCODE_MASK), edns, repinfo, worker->scratchpad, - worker->env.now_tv)) + worker->env.now_tv)) return 0; msg->rep->flags |= BIT_QR|BIT_RA; if(!apply_edns_options(edns, &edns_bak, worker->env.cfg, @@ -688,7 +688,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, edns->bits &= EDNS_DO; if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep, LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad, - worker->env.now_tv)) + worker->env.now_tv)) goto bail_out; error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL, qinfo, id, flags, edns); @@ -760,7 +760,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo, udpsize, edns, (int)(edns->bits & EDNS_DO), *is_secure_answer)) { if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL, LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad, - worker->env.now_tv)) + worker->env.now_tv)) edns->opt_list = NULL; error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL, qinfo, id, flags, edns); @@ -849,7 +849,7 @@ chaos_replystr(sldns_buffer* pkt, char** str, int num, struct edns_data* edns, edns->bits &= EDNS_DO; if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL, LDNS_RCODE_NOERROR, edns, repinfo, worker->scratchpad, - worker->env.now_tv)) + worker->env.now_tv)) edns->opt_list = NULL; if(sldns_buffer_capacity(pkt) >= sldns_buffer_limit(pkt)+calc_edns_field_size(edns)) diff --git a/doc/Changelog b/doc/Changelog index e8da85d6a..c7d09cbb6 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Merge PR #391 from fhriley: Add start_time to reply callbacks so modules can compute the response time. - For #391: use struct timeval* start_time for callback information. + - For #391: fix indentation. 6 January 2021: Wouter - Fix #379: zone loading over HTTP appears to have buffer issues. diff --git a/pythonmod/pythonmod.h b/pythonmod/pythonmod.h index f5ae9ca56..26d74e09f 100644 --- a/pythonmod/pythonmod.h +++ b/pythonmod/pythonmod.h @@ -73,7 +73,7 @@ int python_inplace_cb_reply_generic(struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct edns_option** opt_list_out, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time, int id, void* python_callback); + struct timeval* start_time, int id, void* python_callback); /** Declared here for fptr_wlist access. The definition is in interface.i. */ int python_inplace_cb_query_generic( diff --git a/services/mesh.c b/services/mesh.c index 4c806dc4b..270ffb8ba 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -1350,7 +1350,7 @@ void mesh_query_done(struct mesh_state* mstate) } } for(r = mstate->reply_list; r; r = r->next) { - tv = r->start_time; + tv = r->start_time; /* if a response-ip address block has been stored the * information should be logged for each client. */ @@ -1992,7 +1992,7 @@ mesh_serve_expired_callback(void* arg) log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep); for(r = mstate->reply_list; r; r = r->next) { - tv = r->start_time; + tv = r->start_time; /* If address info is returned, it means the action should be an * 'inform' variant and the information should be logged. */ diff --git a/util/data/msgreply.c b/util/data/msgreply.c index a48cb78f1..35cd8b93e 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -1036,7 +1036,7 @@ static int inplace_cb_reply_call_generic( struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time) + struct timeval* start_time) { struct inplace_cb* cb; struct edns_option* opt_list_out = NULL; @@ -1058,7 +1058,7 @@ static int inplace_cb_reply_call_generic( int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time) + struct timeval* start_time) { return inplace_cb_reply_call_generic( env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo, @@ -1069,7 +1069,7 @@ int inplace_cb_reply_cache_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time) + struct timeval* start_time) { return inplace_cb_reply_call_generic( env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache, @@ -1080,7 +1080,7 @@ int inplace_cb_reply_local_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time) + struct timeval* start_time) { return inplace_cb_reply_call_generic( env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local, @@ -1091,7 +1091,7 @@ int inplace_cb_reply_servfail_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time) + struct timeval* start_time) { /* We are going to servfail. Remove any potential edns options. */ if(qstate) diff --git a/util/data/msgreply.h b/util/data/msgreply.h index 32466644f..76b75ea8a 100644 --- a/util/data/msgreply.h +++ b/util/data/msgreply.h @@ -559,7 +559,7 @@ struct edns_option* edns_opt_list_find(struct edns_option* list, uint16_t code); int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time); + struct timeval* start_time); /** * Call the registered functions in the inplace_cb_reply_cache linked list. @@ -578,7 +578,7 @@ int inplace_cb_reply_cache_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time); + struct timeval* start_time); /** * Call the registered functions in the inplace_cb_reply_local linked list. @@ -597,7 +597,7 @@ int inplace_cb_reply_local_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time); + struct timeval* start_time); /** * Call the registered functions in the inplace_cb_reply linked list. @@ -617,7 +617,7 @@ int inplace_cb_reply_servfail_call(struct module_env* env, struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time); + struct timeval* start_time); /** * Call the registered functions in the inplace_cb_query linked list. diff --git a/util/module.h b/util/module.h index 9267b49e8..81a31a9cc 100644 --- a/util/module.h +++ b/util/module.h @@ -258,7 +258,7 @@ typedef int inplace_cb_reply_func_type(struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct edns_option** opt_list_out, struct comm_reply* repinfo, struct regional* region, - struct timeval* start_time, int id, void* callback); + struct timeval* start_time, int id, void* callback); /** * Inplace callback function called before sending the query to a nameserver.