]> granicus.if.org Git - pdns/commitdiff
This commit fixes ticket #6, as reported by Mario Manno in http://mailman.powerdns...
authorBert Hubert <bert.hubert@netherlabs.nl>
Wed, 9 Feb 2005 19:48:00 +0000 (19:48 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Wed, 9 Feb 2005 19:48:00 +0000 (19:48 +0000)
For a very long time, launching multiple backends of the same type has been broken, it may in fact never have worked.

Mario's suggested fix was bottom up and required patches for most backends, the applied fix is the other way around.

Thanks mario!

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@297 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnsbackend.cc

index 594e576c6ee81dc34f8070b0fc7c8b2ee1f9e3ae..490ac467c88d3bad7c186ba6420284e74f6c3cdc 100644 (file)
@@ -64,7 +64,7 @@ int DNSBackend::getArgAsNum(const string &key)
 
 void BackendFactory::declare(const string &suffix, const string &param, const string &help, const string &value)
 {
-  string fullname=d_name+"-"+suffix+param;
+  string fullname=d_name+suffix+"-"+param;
   arg().set(fullname,help)=value;
 }
 
@@ -148,7 +148,7 @@ void BackendMakerClass::launch(const string &instr)
     stringtok(pparts,part,": ");
     module=pparts[0];
     if(pparts.size()>1)
-      name=pparts[1]+"-";
+      name="-"+pparts[1];
       
     if(d_repository.find(module)==d_repository.end()) {
       // this is *so* userfriendly
@@ -156,7 +156,6 @@ void BackendMakerClass::launch(const string &instr)
       if(d_repository.find(module)==d_repository.end())
        throw ArgException("Trying to launch unknown backend '"+module+"'");
     }
-    
     d_repository[module]->declareArguments(name);
     d_instances.push_back(make_pair(module,name));
   }