bin/tests/system/dlzexternal/driver.c
/*
 * Delete a record from a list
 */
Delete a record from a list
Delete a record from a list
static isc_result_t
del_name(struct dlz_example_data *state, struct record *list,
	 const char *name, const char *type, dns_ttl_t ttl,
	 const char *data)
{
	int i;
	UNUSED(state);
	for (i = 0; i < MAX_RECORDS; i++) {
		if (strcasecmp(name, list[i].name) == 0 &&
		    strcasecmp(type, list[i].type) == 0 &&
		    strcasecmp(data, list[i].data) == 0 &&
		    ttl == list[i].ttl) {
			break;
		}
	}
	if (i == MAX_RECORDS) {
		return (ISC_R_NOTFOUND);
	}
	memset(&list[i], 0, sizeof(struct record));
	return (ISC_R_SUCCESS);
}
static isc_result_t del_name ( struct dlz_example_data * state , struct record * list , const char * name , const char * type , dns_ttl_t ttl , const char * data ) { int i ; UNUSED ( state ) ; for ( i = 0 ; i < MAX_RECORDS ; i ++ ) { if ( strcasecmp ( name , list [ i ] . name ) == 0 && strcasecmp ( type , list [ i ] . type ) == 0 && strcasecmp ( data , list [ i ] . data ) == 0 && ttl == list [ i ] . ttl ) { break ; } } if ( i == MAX_RECORDS ) { return ( ISC_R_NOTFOUND ) ; } memset ( & list [ i ] , 0 , sizeof ( struct record ) ) ; return ( ISC_R_SUCCESS ) ; }
Delete a record from a list
Delete a record from a list