New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindbackend: Fix transaction to return false on failure #5702

Merged
merged 4 commits into from Sep 21, 2017

Conversation

Projects
None yet
3 participants
@cmouse
Contributor

cmouse commented Sep 18, 2017

Short description

Make bindbackend startTransaction to return false when it has failed.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

cmouse added some commits Sep 18, 2017

bindbackend: Return false if domain_id is negative
It should return false, because it has effectively failed.
Returning true can cause several problems later on as
various functions assume they have valid file handle pointer
and valid domain ID to look up, which they don't.
bindbackend: Move throw to correct place in startTransaction
The cleanup code wasn't being executed due to premature throw

@Habbie Habbie merged commit de06f93 into PowerDNS:master Sep 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@aerique aerique added the auth label Oct 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment