Lines Matching refs:res
136 if (res_ninit(ctx->res) < 0)
156 if (ctx->res)
157 res_nclose(ctx->res);
162 if (ctx->res && ctx->free_res)
163 (*ctx->free_res)(ctx->res);
360 n = res_nmkquery(ctx->res, QUERY, name, class, T_TXT, NULL, 0,
366 n = res_nsend(ctx->res, qbuf, n, abuf, MAX_HESRESP);
466 if (!ctx->res) {
467 struct __res_state *res;
468 res = (struct __res_state *)malloc(sizeof *res);
469 if (res == NULL) {
473 memset(res, 0, sizeof *res);
474 __hesiod_res_set(ctx, res, free);
477 return (ctx->res);
481 __hesiod_res_set(void *context, struct __res_state *res,
485 if (ctx->res && ctx->free_res) {
486 res_nclose(ctx->res);
487 (*ctx->free_res)(ctx->res);
490 ctx->res = res;
497 if (!ctx->res && !__hesiod_res_get(ctx))
500 if (((ctx->res->options & RES_INIT) == 0U) &&
501 (res_ninit(ctx->res) == -1))