Skip to content

Fix catz db update callback registration logic error (take two)

Arаm Sаrgsyаn requested to merge 4418-catz-rbtdb-cds_lfht_destroy-failed into main

Please see the 998765fe commit for the description of the original issue. The commit had fixed the logic error, but it was reintroduced again later with the a1afa31a commit, where the check of the 'db_registered' flag was removed in dns__catz_update_cb(). The check was removed, because the registration function was made idempotent, so double registration is not an issue, but the check also prevented from unneeded registration, on which the original fix relied.

This commit just removes the update callback registration code from the dns__catz_update_cb() function instead of bringing back the check, because after code flow analysis, it is now clear that it's not required at all. The "call onupdate() artificially" comment (which was mentioned by the removed code) is speaking about the dns_catz_dbupdate_callback() function, which is called by server.c on (re)configuration, and that function already takes care of update callback's registration since the 998765fe commit was applied, so there is no need to do that here again.

Closes #4418 (closed)

Merge request reports