Lines Matching defs:lctx
106 isc_result_t (*openfile)(dns_loadctx_t *lctx,
108 isc_result_t (*load)(dns_loadctx_t *lctx);
167 #define DNS_LCTX_VALID(lctx) ISC_MAGIC_VALID(lctx, DNS_LCTX_MAGIC)
172 openfile_text(dns_loadctx_t *lctx, const char *master_file);
175 load_text(dns_loadctx_t *lctx);
178 openfile_raw(dns_loadctx_t *lctx, const char *master_file);
181 load_raw(dns_loadctx_t *lctx);
184 openfile_map(dns_loadctx_t *lctx, const char *master_file);
187 load_map(dns_loadctx_t *lctx);
190 pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx);
211 task_send(dns_loadctx_t *lctx);
214 loadctx_destroy(dns_loadctx_t *lctx);
225 if (MANYERRS(lctx, result)) { \
226 SETRESULT(lctx, result); \
236 if (MANYERRS(lctx, result)) { \
237 SETRESULT(lctx, result); \
250 result = commit(callbacks, lctx, ¤t_list, \
252 if (MANYERRS(lctx, result)) { \
253 SETRESULT(lctx, result); \
256 result = commit(callbacks, lctx, &glue_list, \
258 if (MANYERRS(lctx, result)) { \
259 SETRESULT(lctx, result); \
279 GETTOKEN(lctx->lex, 0, &token, ISC_TRUE); \
281 isc_lex_ungettoken(lctx->lex, &token); \
283 if (MANYERRS(lctx, result)) { \
284 SETRESULT(lctx, result); \
293 #define MANYERRS(lctx, result) \
296 ((lctx)->options & DNS_MASTER_MANYERRORS) != 0)
298 #define SETRESULT(lctx, r) \
300 if ((lctx)->result == ISC_R_SUCCESS) \
301 (lctx)->result = r; \
401 dns_loadctx_t *lctx;
405 lctx = *lctxp;
406 REQUIRE(DNS_LCTX_VALID(lctx));
408 LOCK(&lctx->lock);
409 INSIST(lctx->references > 0);
410 lctx->references--;
411 if (lctx->references == 0)
413 UNLOCK(&lctx->lock);
416 loadctx_destroy(lctx);
437 loadctx_destroy(dns_loadctx_t *lctx) {
441 REQUIRE(DNS_LCTX_VALID(lctx));
443 lctx->magic = 0;
444 if (lctx->inc != NULL)
445 incctx_destroy(lctx->mctx, lctx->inc);
447 if (lctx->f != NULL) {
448 result = isc_stdio_close(lctx->f);
457 if (lctx->lex != NULL && !lctx->keep_lex)
458 isc_lex_destroy(&lctx->lex);
460 if (lctx->task != NULL)
461 isc_task_detach(&lctx->task);
462 DESTROYLOCK(&lctx->lock);
464 isc_mem_attach(lctx->mctx, &mctx);
465 isc_mem_detach(&lctx->mctx);
466 isc_mem_put(mctx, lctx, sizeof(*lctx));
514 dns_loadctx_t *lctx;
530 lctx = isc_mem_get(mctx, sizeof(*lctx));
531 if (lctx == NULL)
533 result = isc_mutex_init(&lctx->lock);
535 isc_mem_put(mctx, lctx, sizeof(*lctx));
539 lctx->inc = NULL;
540 result = incctx_create(mctx, origin, &lctx->inc);
544 lctx->maxttl = 0;
546 lctx->format = format;
551 lctx->openfile = openfile_text;
552 lctx->load = load_text;
555 lctx->openfile = openfile_raw;
556 lctx->load = load_raw;
559 lctx->openfile = openfile_map;
560 lctx->load = load_map;
565 lctx->lex = lex;
566 lctx->keep_lex = ISC_TRUE;
568 lctx->lex = NULL;
569 result = isc_lex_create(mctx, TOKENSIZ, &lctx->lex);
572 lctx->keep_lex = ISC_FALSE;
578 isc_lex_setspecials(lctx->lex, specials);
579 isc_lex_setcomments(lctx->lex, ISC_LEXCOMMENT_DNSMASTERFILE);
582 lctx->ttl_known = ISC_TF((options & DNS_MASTER_NOTTL) != 0);
583 lctx->ttl = 0;
584 lctx->default_ttl_known = lctx->ttl_known;
585 lctx->default_ttl = 0;
586 lctx->warn_1035 = ISC_TRUE; /* XXX Argument? */
587 lctx->warn_tcr = ISC_TRUE; /* XXX Argument? */
588 lctx->warn_sigexpired = ISC_TRUE; /* XXX Argument? */
589 lctx->options = options;
590 lctx->seen_include = ISC_FALSE;
591 lctx->zclass = zclass;
592 lctx->resign = resign;
593 lctx->result = ISC_R_SUCCESS;
594 lctx->include_cb = include_cb;
595 lctx->include_arg = include_arg;
596 isc_stdtime_get(&lctx->now);
598 dns_fixedname_init(&lctx->fixed_top);
599 lctx->top = dns_fixedname_name(&lctx->fixed_top);
601 dns_name_fromregion(lctx->top, &r);
603 lctx->f = NULL;
604 lctx->first = ISC_TRUE;
605 dns_master_initrawheader(&lctx->header);
607 lctx->loop_cnt = (done != NULL) ? 100 : 0;
608 lctx->callbacks = callbacks;
609 lctx->task = NULL;
611 isc_task_attach(task, &lctx->task);
612 lctx->done = done;
613 lctx->done_arg = done_arg;
614 lctx->canceled = ISC_FALSE;
615 lctx->mctx = NULL;
616 isc_mem_attach(mctx, &lctx->mctx);
617 lctx->references = 1; /* Implicit attach. */
618 lctx->magic = DNS_LCTX_MAGIC;
619 *lctxp = lctx;
623 incctx_destroy(mctx, lctx->inc);
625 isc_mem_put(mctx, lctx, sizeof(*lctx));
773 generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
795 ictx = lctx->inc;
796 callbacks = lctx->callbacks;
801 target_mem = isc_mem_get(lctx->mctx, target_size);
802 rhsbuf = isc_mem_get(lctx->mctx, DNS_MASTER_RHS);
803 lhsbuf = isc_mem_get(lctx->mctx, DNS_MASTER_LHS);
840 if ((lctx->options & DNS_MASTER_ZONE) != 0 &&
841 (lctx->options & DNS_MASTER_SLAVE) == 0 &&
868 if ((lctx->options & DNS_MASTER_ZONE) != 0 &&
869 (lctx->options & DNS_MASTER_SLAVE) == 0 &&
870 (lctx->options & DNS_MASTER_KEY) == 0 &&
871 !dns_name_issubdomain(owner, lctx->top))
889 result = isc_lex_openbuffer(lctx->lex, &buffer);
894 result = dns_rdata_fromtext(&rdata, lctx->zclass, type,
895 lctx->lex, ictx->origin, 0,
896 lctx->mctx, &target, callbacks);
897 RUNTIME_CHECK(isc_lex_close(lctx->lex) == ISC_R_SUCCESS);
903 rdatalist.rdclass = lctx->zclass;
904 rdatalist.ttl = lctx->ttl;
907 result = commit(callbacks, lctx, &head, owner, source, line);
929 isc_mem_put(lctx->mctx, target_mem, target_size);
931 isc_mem_put(lctx->mctx, lhsbuf, DNS_MASTER_LHS);
933 isc_mem_put(lctx->mctx, rhsbuf, DNS_MASTER_RHS);
954 check_ns(dns_loadctx_t *lctx, isc_token_t *token, const char *source,
961 if ((lctx->options & DNS_MASTER_FATALNS) != 0)
962 callback = lctx->callbacks->error;
964 callback = lctx->callbacks->warn;
970 tmp = isc_mem_strdup(lctx->mctx, DNS_AS_STR(*token));
983 (*callback)(lctx->callbacks, "%s:%lu: NS record '%s' "
987 isc_mem_free(lctx->mctx, tmp);
1009 openfile_text(dns_loadctx_t *lctx, const char *master_file) {
1010 return (isc_lex_openfile(lctx->lex, master_file));
1014 load_text(dns_loadctx_t *lctx) {
1063 REQUIRE(DNS_LCTX_VALID(lctx));
1064 callbacks = lctx->callbacks;
1065 mctx = lctx->mctx;
1066 ictx = lctx->inc;
1084 if ((lctx->options & DNS_MASTER_CHECKNAMES) != 0)
1086 if ((lctx->options & DNS_MASTER_CHECKNAMESFAIL) != 0)
1088 if ((lctx->options & DNS_MASTER_CHECKMX) != 0)
1090 if ((lctx->options & DNS_MASTER_CHECKMXFAIL) != 0)
1092 source = isc_lex_getsourcename(lctx->lex);
1095 line = isc_lex_getsourceline(lctx->lex);
1096 GETTOKEN(lctx->lex, ISC_LEXOPT_INITIALWS | ISC_LEXOPT_QSTRING,
1098 line = isc_lex_getsourceline(lctx->lex);
1102 WARNUNEXPECTEDEOF(lctx->lex);
1106 lctx->inc = ictx->parent;
1108 incctx_destroy(lctx->mctx, ictx);
1109 RUNTIME_CHECK(isc_lex_close(lctx->lex) == ISC_R_SUCCESS);
1110 line = isc_lex_getsourceline(lctx->lex);
1112 source = isc_lex_getsourcename(lctx->lex);
1113 ictx = lctx->inc;
1145 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1149 GETTOKENERR(lctx->lex, 0, &token, ISC_FALSE,
1150 lctx->ttl = 0;
1151 lctx->default_ttl_known = ISC_TRUE;);
1154 &lctx->ttl);
1155 if (MANYERRS(lctx, result)) {
1156 SETRESULT(lctx, result);
1157 lctx->ttl = 0;
1160 limit_ttl(callbacks, source, line, &lctx->ttl);
1161 lctx->default_ttl = lctx->ttl;
1162 lctx->default_ttl_known = ISC_TRUE;
1168 if ((lctx->options & DNS_MASTER_NOINCLUDE)
1187 GETTOKEN(lctx->lex, ISC_LEXOPT_QSTRING, &token,
1197 GETTOKEN(lctx->lex, 0, &token, ISC_TRUE);
1202 WARNUNEXPECTEDEOF(lctx->lex);
1207 ictx->origin, lctx);
1208 if (MANYERRS(lctx, result)) {
1209 SETRESULT(lctx, result);
1216 ictx = lctx->inc;
1218 isc_lex_getsourcename(lctx->lex);
1219 line = isc_lex_getsourceline(lctx->lex);
1233 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1237 if (MANYERRS(lctx, result)) {
1238 SETRESULT(lctx, result);
1276 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1284 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1293 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1297 GETTOKEN(lctx->lex, 0, &token,
1302 &lctx->ttl)
1305 &lctx->ttl);
1306 lctx->ttl_known = ISC_TRUE;
1308 GETTOKEN(lctx->lex, 0, &token,
1316 GETTOKEN(lctx->lex, 0, &token,
1326 GETTOKEN(lctx->lex, ISC_LEXOPT_QSTRING,
1333 if (!lctx->ttl_known &&
1334 !lctx->default_ttl_known) {
1339 if (MANYERRS(lctx, result)) {
1340 SETRESULT(lctx, result);
1341 lctx->ttl = 0;
1345 lctx->default_ttl_known) {
1346 lctx->ttl = lctx->default_ttl;
1353 if (rdclass != 0 && rdclass != lctx->zclass) {
1356 result = generate(lctx, range, lhs, gtype, rhs,
1358 if (MANYERRS(lctx, result)) {
1359 SETRESULT(lctx, result);
1372 if (MANYERRS(lctx, result)) {
1373 SETRESULT(lctx, result);
1396 if (MANYERRS(lctx, result)) {
1397 SETRESULT(lctx, result);
1422 result = pushfile(include_file, new_name, lctx);
1423 if (MANYERRS(lctx, result)) {
1424 SETRESULT(lctx, result);
1431 ictx = lctx->inc;
1433 source = isc_lex_getsourcename(lctx->lex);
1434 line = isc_lex_getsourceline(lctx->lex);
1451 result = commit(callbacks, lctx, &glue_list,
1454 if (MANYERRS(lctx, result)) {
1455 SETRESULT(lctx, result);
1487 result = commit(callbacks, lctx,
1492 if (MANYERRS(lctx, result)) {
1493 SETRESULT(lctx, result);
1512 if ((lctx->options & DNS_MASTER_CHECKWILDCARD)
1518 if ((lctx->options & DNS_MASTER_ZONE) != 0 &&
1519 (lctx->options & DNS_MASTER_SLAVE) == 0 &&
1520 (lctx->options & DNS_MASTER_KEY) == 0 &&
1521 !dns_name_issubdomain(new_name, lctx->top))
1542 if (MANYERRS(lctx, result)) {
1543 SETRESULT(lctx, result);
1562 GETTOKEN(lctx->lex, 0, &token, initialws);
1571 WARNUNEXPECTEDEOF(lctx->lex);
1573 isc_lex_ungettoken(lctx->lex, &token);
1582 if (MANYERRS(lctx, result)) {
1583 SETRESULT(lctx, result);
1610 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1614 &lctx->ttl);
1616 limit_ttl(callbacks, source, line, &lctx->ttl);
1618 lctx->ttl_known = ISC_TRUE;
1619 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1626 if (MANYERRS(lctx, result)) {
1627 SETRESULT(lctx, result);
1638 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1644 if (MANYERRS(lctx, result)) {
1645 SETRESULT(lctx, result);
1660 if (MANYERRS(lctx, result)) {
1661 SETRESULT(lctx, result);
1672 if (rdclass != 0 && rdclass != lctx->zclass) {
1677 dns_rdataclass_format(lctx->zclass, classname2,
1685 if (MANYERRS(lctx, result)) {
1686 SETRESULT(lctx, result);
1700 if ((lctx->options & DNS_MASTER_ZONE) != 0 &&
1701 (lctx->options & DNS_MASTER_SLAVE) == 0 &&
1713 if (MANYERRS(lctx, result)) {
1714 SETRESULT(lctx, result);
1723 if ((lctx->options & DNS_MASTER_ZONE) != 0 &&
1724 (lctx->options & DNS_MASTER_SLAVE) == 0 &&
1737 if (MANYERRS(lctx, result)) {
1738 SETRESULT(lctx, result);
1762 lctx->zclass == dns_rdataclass_in &&
1763 (lctx->options & DNS_MASTER_CHECKNS) != 0) {
1765 GETTOKEN(lctx->lex, 0, &token, ISC_FALSE);
1766 result = check_ns(lctx, &token, source, line);
1767 isc_lex_ungettoken(lctx->lex, &token);
1768 if ((lctx->options & DNS_MASTER_FATALNS) != 0) {
1769 if (MANYERRS(lctx, result)) {
1770 SETRESULT(lctx, result);
1780 if ((lctx->options & DNS_MASTER_CHECKNAMES) != 0) {
1786 ok = dns_rdata_checkowner(name, lctx->zclass, type,
1794 if (CHECKNAMESFAIL(lctx->options) ||
1800 if (MANYERRS(lctx, result)) {
1801 SETRESULT(lctx, result);
1824 result = dns_rdata_fromtext(&rdata[rdcount], lctx->zclass,
1825 type, lctx->lex, ictx->origin,
1826 options, lctx->mctx, &target,
1828 if (MANYERRS(lctx, result)) {
1829 SETRESULT(lctx, result);
1840 (lctx->options & DNS_MASTER_ZONE) != 0 &&
1841 dns_name_compare(ictx->current, lctx->top) != 0) {
1849 if (MANYERRS(lctx, result)) {
1850 SETRESULT(lctx, result);
1864 if (!lctx->ttl_known && !lctx->default_ttl_known) {
1870 lctx->ttl = dns_soa_getminimum(&rdata[rdcount]);
1871 limit_ttl(callbacks, source, line, &lctx->ttl);
1872 lctx->default_ttl = lctx->ttl;
1873 lctx->default_ttl_known = ISC_TRUE;
1874 } else if ((lctx->options & DNS_MASTER_HINT) != 0) {
1878 lctx->ttl = 0;
1879 lctx->default_ttl = lctx->ttl;
1880 lctx->default_ttl_known = ISC_TRUE;
1887 if (MANYERRS(lctx, result)) {
1888 SETRESULT(lctx, result);
1889 lctx->ttl = 0;
1894 } else if (!explicit_ttl && lctx->default_ttl_known) {
1895 lctx->ttl = lctx->default_ttl;
1896 } else if (!explicit_ttl && lctx->warn_1035) {
1901 lctx->warn_1035 = ISC_FALSE;
1904 if (type == dns_rdatatype_rrsig && lctx->warn_sigexpired) {
1909 if (isc_serial_lt(sig.timeexpire, lctx->now)) {
1914 lctx->warn_sigexpired = ISC_FALSE;
1919 lctx->warn_tcr && (lctx->options & DNS_MASTER_ZONE) != 0 &&
1920 (lctx->options & DNS_MASTER_SLAVE) == 0) {
1923 lctx->warn_tcr = ISC_FALSE;
1926 if ((lctx->options & DNS_MASTER_AGETTL) != 0) {
1931 if (lctx->ttl < ttl_offset)
1933 lctx->ttl -= ttl_offset;
1972 this->rdclass = lctx->zclass;
1973 this->ttl = lctx->ttl;
1979 } else if (this->ttl != lctx->ttl) {
1984 lctx->ttl = this->ttl;
1987 if ((lctx->options & DNS_MASTER_CHECKTTL) != 0 &&
1988 lctx->ttl > lctx->maxttl)
1993 source, line, lctx->ttl, lctx->maxttl);
2013 } while (!done && (lctx->loop_cnt == 0 || loop_cnt++ < lctx->loop_cnt));
2018 result = commit(callbacks, lctx, ¤t_list, ictx->current,
2020 if (MANYERRS(lctx, result)) {
2021 SETRESULT(lctx, result);
2024 result = commit(callbacks, lctx, &glue_list, ictx->glue,
2026 if (MANYERRS(lctx, result)) {
2027 SETRESULT(lctx, result);
2032 INSIST(lctx->done != NULL && lctx->task != NULL);
2034 } else if (result == ISC_R_SUCCESS && lctx->result != ISC_R_SUCCESS) {
2035 result = lctx->result;
2036 } else if (result == ISC_R_SUCCESS && lctx->seen_include)
2072 pushfile(const char *master_file, dns_name_t *origin, dns_loadctx_t *lctx) {
2080 REQUIRE(DNS_LCTX_VALID(lctx));
2082 ictx = lctx->inc;
2083 lctx->seen_include = ISC_TRUE;
2085 result = incctx_create(lctx->mctx, origin, &newctx);
2110 result = (lctx->openfile)(lctx, master_file);
2114 lctx->inc = newctx;
2116 if (lctx->include_cb != NULL)
2117 lctx->include_cb(master_file, lctx->include_arg);
2121 incctx_destroy(lctx->mctx, newctx);
2154 load_header(dns_loadctx_t *lctx) {
2163 REQUIRE(DNS_LCTX_VALID(lctx));
2165 if (lctx->format != dns_masterformat_raw &&
2166 lctx->format != dns_masterformat_map)
2169 callbacks = lctx->callbacks;
2175 result = isc_stdio_read(data, 1, commonlen, lctx->f, NULL);
2185 if (header.format != lctx->format) {
2188 lctx->format == dns_masterformat_map
2210 result = isc_stdio_read(data + commonlen, 1, remainder, lctx->f, NULL);
2226 lctx->first = ISC_FALSE;
2227 lctx->header = header;
2233 openfile_map(dns_loadctx_t *lctx, const char *master_file) {
2236 result = isc_stdio_open(master_file, "rb", &lctx->f);
2250 load_map(dns_loadctx_t *lctx) {
2254 REQUIRE(DNS_LCTX_VALID(lctx));
2256 callbacks = lctx->callbacks;
2258 if (lctx->first) {
2259 result = load_header(lctx);
2265 lctx->f, sizeof(dns_masterrawheader_t));
2272 openfile_raw(dns_loadctx_t *lctx, const char *master_file) {
2275 result = isc_stdio_open(master_file, "rb", &lctx->f);
2286 load_raw(dns_loadctx_t *lctx) {
2296 isc_mem_t *mctx = lctx->mctx;
2304 callbacks = lctx->callbacks;
2307 if (lctx->first) {
2308 result = load_header(lctx);
2339 (lctx->loop_cnt == 0 || loop_cnt < lctx->loop_cnt);
2352 lctx->f, NULL);
2400 lctx->f, NULL);
2409 if (lctx->zclass != rdatalist.rdclass) {
2425 sizeof(namelen), lctx->f, &totallen);
2435 lctx->f, &totallen);
2444 if ((lctx->options & DNS_MASTER_CHECKTTL) != 0 &&
2445 rdatalist.ttl > lctx->maxttl)
2451 rdatalist.ttl, lctx->maxttl);
2485 result = commit(callbacks, lctx, &head, name,
2505 sizeof(rdlen), lctx->f,
2513 rdlen, lctx->f, &totallen);
2547 result = commit(callbacks, lctx, &head, name, NULL, 0);
2559 INSIST(lctx->done != NULL && lctx->task != NULL);
2561 } else if (result == ISC_R_SUCCESS && lctx->result != ISC_R_SUCCESS)
2562 result = lctx->result;
2565 (*callbacks->rawdata)(callbacks->zone, &lctx->header);
2638 dns_loadctx_t *lctx = NULL;
2643 include_cb, include_arg, NULL, &lctx);
2647 lctx->maxttl = maxttl;
2649 result = (lctx->openfile)(lctx, master_file);
2653 result = (lctx->load)(lctx);
2657 dns_loadctx_detach(&lctx);
2731 dns_loadctx_t *lctx = NULL;
2739 include_cb, include_arg, NULL, &lctx);
2743 lctx->maxttl = maxttl;
2745 result = (lctx->openfile)(lctx, master_file);
2749 result = task_send(lctx);
2751 dns_loadctx_attach(lctx, lctxp);
2756 dns_loadctx_detach(&lctx);
2766 dns_loadctx_t *lctx = NULL;
2772 NULL, NULL, NULL, &lctx);
2776 result = isc_lex_openstream(lctx->lex, stream);
2780 result = (lctx->load)(lctx);
2784 if (lctx != NULL)
2785 dns_loadctx_detach(&lctx);
2797 dns_loadctx_t *lctx = NULL;
2805 done_arg, NULL, NULL, NULL, &lctx);
2809 result = isc_lex_openstream(lctx->lex, stream);
2813 result = task_send(lctx);
2815 dns_loadctx_attach(lctx, lctxp);
2820 if (lctx != NULL)
2821 dns_loadctx_detach(&lctx);
2832 dns_loadctx_t *lctx = NULL;
2838 NULL, NULL, NULL, &lctx);
2842 result = isc_lex_openbuffer(lctx->lex, buffer);
2846 result = (lctx->load)(lctx);
2850 dns_loadctx_detach(&lctx);
2863 dns_loadctx_t *lctx = NULL;
2871 done_arg, NULL, NULL, NULL, &lctx);
2875 result = isc_lex_openbuffer(lctx->lex, buffer);
2879 result = task_send(lctx);
2881 dns_loadctx_attach(lctx, lctxp);
2886 dns_loadctx_detach(&lctx);
2897 dns_loadctx_t *lctx = NULL;
2903 NULL, NULL, lex, &lctx);
2907 result = (lctx->load)(lctx);
2910 dns_loadctx_detach(&lctx);
2923 dns_loadctx_t *lctx = NULL;
2931 done_arg, NULL, NULL, lex, &lctx);
2935 result = task_send(lctx);
2937 dns_loadctx_attach(lctx, lctxp);
2941 dns_loadctx_detach(&lctx);
3061 resign_fromlist(dns_rdatalist_t *this, dns_loadctx_t *lctx) {
3069 if (isc_serial_gt(sig.timesigned, lctx->now))
3070 when = lctx->now;
3072 when = sig.timeexpire - lctx->resign;
3077 if (isc_serial_gt(sig.timesigned, lctx->now))
3078 when = lctx->now;
3079 else if (sig.timeexpire - lctx->resign < when)
3080 when = sig.timeexpire - lctx->resign;
3092 commit(dns_rdatacallbacks_t *callbacks, dns_loadctx_t *lctx,
3116 (lctx->options & DNS_MASTER_RESIGN) != 0) {
3118 dataset.resign = resign_fromlist(this, lctx);
3137 if (MANYERRS(lctx, result))
3138 SETRESULT(lctx, result);
3185 dns_loadctx_t *lctx;
3188 lctx = event->ev_arg;
3189 REQUIRE(DNS_LCTX_VALID(lctx));
3191 if (lctx->canceled)
3194 result = (lctx->load)(lctx);
3196 event->ev_arg = lctx;
3199 (lctx->done)(lctx->done_arg, result);
3201 dns_loadctx_detach(&lctx);
3206 task_send(dns_loadctx_t *lctx) {
3209 event = isc_event_allocate(lctx->mctx, NULL,
3211 load_quantum, lctx, sizeof(*event));
3214 isc_task_send(lctx->task, &event);
3219 dns_loadctx_cancel(dns_loadctx_t *lctx) {
3220 REQUIRE(DNS_LCTX_VALID(lctx));
3222 LOCK(&lctx->lock);
3223 lctx->canceled = ISC_TRUE;
3224 UNLOCK(&lctx->lock);