bin/named/update.c
/*
	 * XXXRTH  Failures in this routine will be worth logging, when
	 *         we have a logging system.  Failure to find the zonename
	 *	   or the SOA rdataset warrant at least an UNEXPECTED_ERROR().
	 */
XXXRTH  Failures in this routine will be worth logging, when
we have a logging system.  Failure to find the zonename
or the SOA rdataset warrant at least an UNEXPECTED_ERROR().
XXXRTH Failures in this routine will be worth logging when we have a logging system . Failure to find the zonename or the SOA rdataset warrant at least an UNEXPECTED_ERROR () .
static isc_result_t
increment_soa_serial(dns_db_t *db, dns_dbversion_t *ver,
		     dns_diff_t *diff, isc_mem_t *mctx)
{
	dns_difftuple_t *deltuple = NULL;
	dns_difftuple_t *addtuple = NULL;
	isc_uint32_t serial;
	isc_result_t result;
	CHECK(dns_db_createsoatuple(db, ver, mctx, DNS_DIFFOP_DEL, &deltuple));
	CHECK(dns_difftuple_copy(deltuple, &addtuple));
	addtuple->op = DNS_DIFFOP_ADD;
	serial = dns_soa_getserial(&addtuple->rdata);
	serial = (serial + 1) & 0xFFFFFFFF;
	if (serial == 0)
		serial = 1;
	dns_soa_setserial(serial, &addtuple->rdata);
	CHECK(do_one_tuple(&deltuple, db, ver, diff));
	CHECK(do_one_tuple(&addtuple, db, ver, diff));
	result = ISC_R_SUCCESS;
 failure:
	if (addtuple != NULL)
		dns_difftuple_free(&addtuple);
	if (deltuple != NULL)
		dns_difftuple_free(&deltuple);
	return (result);
}
static isc_result_t increment_soa_serial ( dns_db_t * db , dns_dbversion_t * ver , dns_diff_t * diff , isc_mem_t * mctx ) { dns_difftuple_t * deltuple = NULL ; dns_difftuple_t * addtuple = NULL ; isc_uint32_t serial ; isc_result_t result ; CHECK ( dns_db_createsoatuple ( db , ver , mctx , DNS_DIFFOP_DEL , & deltuple ) ) ; CHECK ( dns_difftuple_copy ( deltuple , & addtuple ) ) ; addtuple -> op = DNS_DIFFOP_ADD ; serial = dns_soa_getserial ( & addtuple -> rdata ) ; serial = ( serial + 1 ) & 0xFFFFFFFF ; if ( serial == 0 ) serial = 1 ; dns_soa_setserial ( serial , & addtuple -> rdata ) ; CHECK ( do_one_tuple ( & deltuple , db , ver , diff ) ) ; CHECK ( do_one_tuple ( & addtuple , db , ver , diff ) ) ; result = ISC_R_SUCCESS ; failure : if ( addtuple != NULL ) dns_difftuple_free ( & addtuple ) ; if ( deltuple != NULL ) dns_difftuple_free ( & deltuple ) ; return ( result ) ; }
XXXRTH  Failures in this routine will be worth logging, when
         we have a logging system.
XXXRTH Failures in this routine will be worth logging when we have a logging system .
/* RFC1982 */