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.
if(id < 0) {
d_transaction_tmpname.clear();
d_transaction_id=id;
- return true;
+ return false;
}
if(id == 0) {
throw DBException("domain_id 0 is invalid for this backend.");
unlink(d_transaction_tmpname.c_str());
delete d_of;
d_of=0;
- return false;
}
*d_of<<"; Written by PowerDNS, don't edit!"<<endl;
bool Bind2Backend::commitTransaction()
{
if(d_transaction_id < 0)
- return true;
+ return false;
delete d_of;
d_of=0;