- Fix function type cast warning in libunbound context callback type.

git-svn-id: file:///svn/unbound/trunk@4676 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2018-05-03 14:12:19 +00:00
parent 581f975b38
commit 8f886fc6dd
4 changed files with 7 additions and 6 deletions

View file

@ -1,6 +1,7 @@
3 May 2018: Wouter
- Fix that configure --with-libhiredis also turns on cachedb.
- Fix gcc 8 buffer warning in testcode.
- Fix function type cast warning in libunbound context callback type.
2 May 2018: Wouter
- Fix fail to reject dead peers in forward-zone, with ssl-upstream.

View file

@ -130,7 +130,7 @@ find_id(struct ub_ctx* ctx, int* id)
struct ctx_query*
context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass,
ub_callback_type cb, void* cbarg)
void* cb, void* cbarg)
{
struct ctx_query* q = (struct ctx_query*)calloc(1, sizeof(*q));
if(!q) return NULL;

View file

@ -148,8 +148,9 @@ struct ctx_query {
/** was this query cancelled (for bg worker) */
int cancelled;
/** for async query, the callback function */
ub_callback_type cb;
/** for async query, the callback function of type ub_callback_type
* for event callbacks the type is ub_event_callback_type */
void* cb;
/** for async query, the callback user arg */
void* cb_arg;
@ -242,7 +243,7 @@ void context_query_delete(struct ctx_query* q);
* @return new ctx_query or NULL for malloc failure.
*/
struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, ub_callback_type cb, void* cbarg);
int rrclass, void* cb, void* cbarg);
/**
* Get a new alloc. Creates a new one or uses a cached one.

View file

@ -747,8 +747,7 @@ ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
ub_comm_base_now(ctx->event_worker->base);
/* create new ctx_query and attempt to add to the list */
q = context_new(ctx, name, rrtype, rrclass, (ub_callback_type)callback,
mydata);
q = context_new(ctx, name, rrtype, rrclass, callback, mydata);
if(!q)
return UB_NOMEM;