]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Pipebackend did not properly propagate pipebackend-abi-version. This closes #45 by...
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 11 Nov 2005 21:02:51 +0000 (21:02 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 11 Nov 2005 21:02:51 +0000 (21:02 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@546 d19b8d6e-7fed-0310-83ef-9ca221ded41b

modules/pipebackend/backend.pl
modules/pipebackend/pipebackend.cc

index 2a25435b5ef12ce6997b73daa156e308cde75a92..d4e8dd546be38eeb49b5ab677fd222dcfde6082d 100755 (executable)
@@ -12,7 +12,7 @@ chomp($line);
 
 unless($line eq "HELO\t1") {
        print "FAIL\n";
-       print STDERR "Recevied '$line'\n";
+       print STDERR "Received '$line'\n";
        <>;
        exit;
 }
index 6ea5b4a5fe8b71bf03d637b757b0c3eb8b7b3479..6190aa4dc59487d52c9d56458a62c35aca902cf1 100644 (file)
@@ -22,6 +22,9 @@ using namespace std;
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <boost/lexical_cast.hpp>
+
+using namespace boost;
 
 #include "pipebackend.hh"
 
@@ -49,7 +52,7 @@ void CoWrapper::launch()
       return;
 
    d_cp=new CoProcess(d_command, d_timeout); 
-   d_cp->send("HELO\t1");
+   d_cp->send("HELO\t"+lexical_cast<string>(arg().asNum("pipebackend-abi-version")));
    string banner;
    d_cp->receive(banner); 
    L<<Logger::Error<<"Backend launched with banner: "<<banner<<endl;