Show
Ignore:
Timestamp:
01/25/11 20:08:54 (2 years ago)
Author:
ahu
Message:

teach backends not to delete a zone if a negative zone-id is passed to startTransaction, but only to start a transaction in that case

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/backends/bind/bindbackend2.cc

    r1885 r1906  
    156156bool Bind2Backend::startTransaction(const string &qname, int id) 
    157157{ 
     158  if(id < 0) { 
     159    d_transaction_tmpname.clear(); 
     160    d_transaction_id=id; 
     161    return true; 
     162  } 
    158163  shared_ptr<State> state = getState();  
    159164 
     
    177182bool Bind2Backend::commitTransaction() 
    178183{ 
     184  if(d_transaction_id < 0) 
     185    return true; 
    179186  delete d_of; 
    180187  d_of=0; 
     
    194201bool Bind2Backend::abortTransaction() 
    195202{ 
    196   if(d_transaction_id) { 
     203  if(d_transaction_id >= 0) { 
    197204    delete d_of; 
    198205    d_of=0;