3916. [contrib] zone2sqlite checked wrong result code. Address
compiler warnings. [RT #36931]
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
3915 [bug] Address a assertion if a route event arrived while
|
||||
3916. [contrib] zone2sqlite checked wrong result code. Address
|
||||
compiler warnings. [RT #36931]
|
||||
|
||||
3915. [bug] Address a assertion if a route event arrived while
|
||||
shutting down. [RT #36887]
|
||||
|
||||
3914. [bug] Allow the URI target and CAA value fields to
|
||||
|
||||
@@ -229,7 +229,8 @@ bdb_init(void)
|
||||
NULL,
|
||||
bdb_allnodes,
|
||||
bdb_create,
|
||||
bdb_destroy
|
||||
bdb_destroy,
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
return dns_sdb_register(DRIVERNAME, &bdb_methods, NULL, 0, ns_g_mctx,
|
||||
|
||||
@@ -179,7 +179,8 @@ static dns_sdbmethods_t dirdb_methods = {
|
||||
dirdb_authority,
|
||||
NULL, /* allnodes */
|
||||
dirdb_create,
|
||||
dirdb_destroy
|
||||
dirdb_destroy,
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -386,6 +386,8 @@ ldapdb_lookup(const char *zone, const char *name, void *dbdata,
|
||||
dns_sdblookup_t *lookup, dns_clientinfomethods_t *methods,
|
||||
dns_clientinfo_t *clientinfo)
|
||||
{
|
||||
UNUSED(methods);
|
||||
UNUSED(clientinfo);
|
||||
return (ldapdb_search(zone, name, dbdata, lookup, NULL, NULL));
|
||||
}
|
||||
#else
|
||||
@@ -661,7 +663,8 @@ static dns_sdbmethods_t ldapdb_methods = {
|
||||
NULL, /* authority */
|
||||
ldapdb_allnodes,
|
||||
ldapdb_create,
|
||||
ldapdb_destroy
|
||||
ldapdb_destroy,
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
/* Wrapper around dns_sdb_register() */
|
||||
|
||||
@@ -335,7 +335,8 @@ static dns_sdbmethods_t pgsqldb_methods = {
|
||||
NULL, /* authority */
|
||||
pgsqldb_allnodes,
|
||||
pgsqldb_create,
|
||||
pgsqldb_destroy
|
||||
pgsqldb_destroy,
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -74,7 +74,7 @@ check_result(isc_result_t result, const char *message) {
|
||||
* "dest" must be an array of at least size 2*strlen(source) + 1.
|
||||
*/
|
||||
static void
|
||||
quotestring(const char *source, char *dest) {
|
||||
quotestring(const unsigned char *source, unsigned char *dest) {
|
||||
while (*source != 0) {
|
||||
if (*source == '\'')
|
||||
*dest++ = '\'';
|
||||
@@ -101,19 +101,19 @@ addrdata(dns_name_t *name, dns_ttl_t ttl, dns_rdata_t *rdata) {
|
||||
result = dns_name_totext(name, ISC_TRUE, &b);
|
||||
check_result(result, "dns_name_totext");
|
||||
namearray[isc_buffer_usedlength(&b)] = 0;
|
||||
quotestring(namearray, canonnamearray);
|
||||
quotestring((const unsigned char *)namearray, canonnamearray);
|
||||
|
||||
isc_buffer_init(&b, typearray, sizeof(typearray) - 1);
|
||||
result = dns_rdatatype_totext(rdata->type, &b);
|
||||
check_result(result, "dns_rdatatype_totext");
|
||||
typearray[isc_buffer_usedlength(&b)] = 0;
|
||||
quotestring(typearray, canontypearray);
|
||||
quotestring((const unsigned char *)typearray, canontypearray);
|
||||
|
||||
isc_buffer_init(&b, dataarray, sizeof(dataarray) - 1);
|
||||
result = dns_rdata_totext(rdata, NULL, &b);
|
||||
check_result(result, "dns_rdata_totext");
|
||||
dataarray[isc_buffer_usedlength(&b)] = 0;
|
||||
quotestring(dataarray, canondataarray);
|
||||
quotestring((const unsigned char *)dataarray, canondataarray);
|
||||
|
||||
snprintf(str, sizeof(str),
|
||||
"INSERT INTO %s (NAME, TTL, RDTYPE, RDATA)"
|
||||
|
||||
@@ -306,7 +306,8 @@ static dns_sdbmethods_t sqlitedb_methods = {
|
||||
NULL, /* authority */
|
||||
sqlitedb_allnodes,
|
||||
sqlitedb_create,
|
||||
sqlitedb_destroy
|
||||
sqlitedb_destroy,
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ addrdata(dns_name_t *name, dns_ttl_t ttl, dns_rdata_t *rdata)
|
||||
res = sqlite3_exec(dbi.db, sql, add_rdata_cb, NULL, &errmsg);
|
||||
sqlite3_free(sql);
|
||||
|
||||
if (result != SQLITE_OK) {
|
||||
if (res != SQLITE_OK) {
|
||||
fprintf(stderr, "INSERT failed: %s\n", errmsg);
|
||||
closeandexit(1);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,8 @@ static dns_sdbmethods_t tcldb_methods = {
|
||||
NULL, /* authority */
|
||||
NULL, /* allnodes */
|
||||
tcldb_create,
|
||||
NULL /* destroy */
|
||||
NULL, /* destroy */
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -130,7 +130,8 @@ static dns_sdbmethods_t timedb_methods = {
|
||||
timedb_authority,
|
||||
NULL, /* allnodes */
|
||||
NULL, /* create */
|
||||
NULL /* destroy */
|
||||
NULL, /* destroy */
|
||||
NULL /* lookup2 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user