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.
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;
/** 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;
* @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.
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;