[Pdns-dev] Re: [Pdns-users] Launch single Backend multiple times
bert hubert
ahu at ds9a.nl
Fri Feb 4 23:17:09 CET 2005
On Fri, Feb 04, 2005 at 10:03:05PM +0100, bert hubert wrote:
> > I am still looking into the problem with suffixes.
> > If I launch a module with module:name the config parser seems broken.
> > Imho the cleanest solution is to change setArgPrefix and not adding '-'
> > at the end of suffix before passing it around.
>
> Hmm - this did work at one point, I wonder what broke it. What happens when
> you try it without this patch?
mm, can you try this patch - should solve your problem.
Index: dnsbackend.cc
===================================================================
--- dnsbackend.cc (revision 277)
+++ dnsbackend.cc (working copy)
@@ -64,7 +64,7 @@
void BackendFactory::declare(const string &suffix, const string ¶m, 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 @@
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 @@
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));
}
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services
More information about the Pdns-dev
mailing list