• Matthijs Mekking's avatar
    Remove rpz->db_registered · 67562802
    Matthijs Mekking authored
    As pointed out in !813 db_registered is sort of redundant.  It is
    set to `true` only in `dns_zone_rpz_enable_db()` right before the
    `dns_rpz_dbupdate_callback()` callback is registered.  It is only
    required in that callback and it is the only place that the callback
    is registered.  Therefore there is no path that that `REQUIRE` can
    fail.
    
    The `db_registered` variable is only set to `false` in
    `dns_rpz_new_zone`, so it is not like the variable is unset again
    later.
    
    The only other place where `db_registered` is checked is in
    `rpz_detach()`.  If `true`, it will call
    `dns_db_updatenotify_unregister()`.  However if that happens, the
    `db_registered` is not set back to `false` thus this implies that
    this may happen multiple times.  If called a second time, most
    likely the unregister function will return `ISC_R_NOTFOUND`, but
    the return value is not checked anyway.  So it can do without the
    `db_registered` check.
    67562802
rpz.c 69.8 KB