Lines Matching defs:resarg
147 typedef struct resarg {
1185 resarg_t *resarg = event->ev_arg;
1192 LOCK(&resarg->lock);
1194 resarg->result = rev->result;
1195 resarg->vresult = rev->vresult;
1198 ISC_LIST_APPEND(*resarg->namelist, name, link);
1201 dns_client_destroyrestrans(&resarg->trans);
1204 if (!resarg->canceled) {
1205 UNLOCK(&resarg->lock);
1213 result = isc_app_ctxonrun(resarg->actx, resarg->client->mctx,
1214 task, suspend, resarg->actx);
1216 isc_app_ctxsuspend(resarg->actx);
1222 UNLOCK(&resarg->lock);
1223 DESTROYLOCK(&resarg->lock);
1224 isc_mem_put(resarg->client->mctx, resarg, sizeof(*resarg));
1235 resarg_t *resarg;
1251 resarg = isc_mem_get(client->mctx, sizeof(*resarg));
1252 if (resarg == NULL)
1255 result = isc_mutex_init(&resarg->lock);
1257 isc_mem_put(client->mctx, resarg, sizeof(*resarg));
1261 resarg->actx = actx;
1262 resarg->client = client;
1263 resarg->result = DNS_R_SERVFAIL;
1264 resarg->namelist = namelist;
1265 resarg->trans = NULL;
1266 resarg->canceled = ISC_FALSE;
1268 client->task, resolve_done, resarg,
1269 &resarg->trans);
1271 DESTROYLOCK(&resarg->lock);
1272 isc_mem_put(client->mctx, resarg, sizeof(*resarg));
1282 LOCK(&resarg->lock);
1284 result = resarg->result;
1285 if (result != ISC_R_SUCCESS && resarg->vresult != ISC_R_SUCCESS) {
1291 result = resarg->vresult;
1293 if (resarg->trans != NULL) {
1298 resarg->canceled = ISC_TRUE;
1299 dns_client_cancelresolve(resarg->trans);
1301 UNLOCK(&resarg->lock);
1303 /* resarg will be freed in the event handler. */
1305 UNLOCK(&resarg->lock);
1307 DESTROYLOCK(&resarg->lock);
1308 isc_mem_put(client->mctx, resarg, sizeof(*resarg));