zonename, filename, classname);
}
- CHECK(dns_zone_create(&zone, mctx, 0));
+ dns_zone_create(&zone, mctx, 0);
dns_zone_settype(zone, dns_zone_primary);
isc_buffer_constinit(&b, reverse, strlen(reverse));
isc_buffer_add(&b, strlen(reverse));
CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
- CHECK(dns_zone_create(&zone, mctx, 0));
+ dns_zone_create(&zone, mctx, 0);
CHECK(dns_zone_setorigin(zone, name));
dns_zone_setview(zone, view);
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
/*
* Create the actual zone.
*/
- CHECK(dns_zone_create(&zone, mctx, 0));
+ dns_zone_create(&zone, mctx, 0);
CHECK(dns_zone_setorigin(zone, name));
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
dns_zone_setclass(zone, view->rdclass);
if (inline_signing) {
dns_zone_getraw(zone, &raw);
if (raw == NULL) {
- CHECK(dns_zone_create(&raw, dns_zone_getmem(zone),
- dns_zone_gettid(zone)));
+ dns_zone_create(&raw, dns_zone_getmem(zone),
+ dns_zone_gettid(zone));
CHECK(dns_zone_setorigin(raw, origin));
dns_zone_setview(raw, view);
dns_zone_setstats(raw, named_g_server->zonestats);
zone_argv[0] = inst->db_name;
- result = dns_zone_create(&raw, inst->mctx, 0); /* FIXME */
- if (result != ISC_R_SUCCESS) {
- log_write(ISC_LOG_ERROR, "create_zone: dns_zone_create -> %s\n",
- isc_result_totext(result));
- goto cleanup;
- }
+ dns_zone_create(&raw, inst->mctx, 0); /* FIXME: all zones are assigned
+ to loop 0 */
result = dns_zone_setorigin(raw, name);
if (result != ISC_R_SUCCESS) {
log_write(ISC_LOG_ERROR,
return (1);
}
- result = dns_zone_create(&zone, mctx, 0);
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "dns_zone_create failed: %s\n",
- isc_result_totext(result));
- return (1);
- }
+ dns_zone_create(&zone, mctx, 0);
result = dns_zone_setorigin(zone, name);
if (result != ISC_R_SUCCESS) {
INSIST(dupzone == NULL);
/* Create it */
- result = dns_zone_create(&zone, view->mctx, 0);
- if (result != ISC_R_SUCCESS) {
- goto cleanup;
- }
+ dns_zone_create(&zone, view->mctx, 0);
result = dns_zone_setorigin(zone, origin);
if (result != ISC_R_SUCCESS) {
goto cleanup;
*** Functions
***/
-isc_result_t
+void
dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx, unsigned int tid);
/*%<
* Creates a new empty zone and attach '*zonep' to it.
*
* Ensures:
*\li '*zonep' refers to a valid zone.
- *
- * Returns:
- *\li #ISC_R_SUCCESS
- *\li #ISC_R_NOMEMORY
- *\li #ISC_R_UNEXPECTED
*/
void
*** Public functions.
***/
-isc_result_t
+void
dns_zone_create(dns_zone_t **zonep, isc_mem_t *mctx, unsigned int tid) {
isc_time_t now;
dns_zone_t *zone = NULL;
dns_zone_setdbtype(zone, dbargc_default, dbargv_default);
*zonep = zone;
- return (ISC_R_SUCCESS);
}
static void
isc_result_t
dns_zonemgr_createzone(dns_zonemgr_t *zmgr, dns_zone_t **zonep) {
- isc_result_t result;
isc_mem_t *mctx = NULL;
dns_zone_t *zone = NULL;
unsigned int tid;
return (ISC_R_FAILURE);
}
- result = dns_zone_create(&zone, mctx, tid);
+ dns_zone_create(&zone, mctx, tid);
- if (result == ISC_R_SUCCESS) {
- *zonep = zone;
- }
+ *zonep = zone;
- return (result);
+ return (ISC_R_SUCCESS);
}
isc_result_t
/*
* Create the zone structure.
*/
- result = dns_zone_create(&zone, mctx, 0);
- if (result != ISC_R_SUCCESS) {
- return (result);
- }
+ dns_zone_create(&zone, mctx, 0);
/*
* Set zone type and origin.