~ubuntu-branches/ubuntu/trusty/pdns/trusty-backports

« back to all changes in this revision

Viewing changes to modules/db2backend/DB2Backend.cc

  • Committer: Package Import Robot
  • Author(s): Matthijs Möhlmann
  • Date: 2011-11-19 11:58:10 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20111119115810-5u926cmriehkt5j7
Tags: 3.0-1
* New upstream version (Closes: #624330, #626909, #617476, #498918, #500572)
  (Closes: #645539, #623036, #521791, #583161, #590285, #499396)
* Update Standards-Version to 3.9.2
* Add lua backend.
* Use new style dh instead of individual dh_* commands.
* Add Homepage to debian/control (Closes: #634947)
* Add pdnssec and dnsreplay utility.
* Use dbconfig-common to populate / upgrade databases.
* Update patch addconfigdir, do not parse ucf-dist files.
* Update manpage pdns_control and include a list of options (Closes: #621724)
* Add manpage for pdnssec.
* Add prerm scripts to the backends, stop the pdns server.
* Add patch from upstream to properly parse priority. (Closes: #533023)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: DB2Backend.cc 477 2005-09-03 18:15:37Z ahu $
 
1
// $Id: DB2Backend.cc 1985 2011-02-07 09:39:22Z ahu $
2
2
 
3
3
#include <string>
4
4
#include <unistd.h>
5
5
#include <stdlib.h>
6
6
#include <sstream>
7
7
 
8
 
using namespace std;
 
8
#include "pdns/namespaces.hh"
9
9
 
10
10
#include <dns.hh>
11
11
#include <dnsbackend.hh>
316
316
   {
317
317
      case kForwardQuery:
318
318
      case kForwardWildcardQuery:
319
 
         strncpy(mParamName, qname.c_str(), sizeof(mParamName));
 
319
         strncpy(mParamName, qname.c_str(), sizeof(mParamName));
320
320
         strncpy(mParamType, qtype.getName().c_str(), sizeof(mParamType));
321
321
         //cerr << ">>>>>>>>  Name = " << mParamName << " Type = " << mParamType << endl;
322
 
         break;
 
322
         break;
323
323
 
324
324
      case kForwardByZoneQuery:
325
 
         strncpy(mParamName, qname.c_str(), sizeof(mParamName));
326
 
         strncpy(mParamType, qtype.getName().c_str(), sizeof(mParamType));       
327
 
         mParamZoneId = zoneId;
 
325
         strncpy(mParamName, qname.c_str(), sizeof(mParamName));
 
326
         strncpy(mParamType, qtype.getName().c_str(), sizeof(mParamType));       
 
327
         mParamZoneId = zoneId;
328
328
         //cerr << ">>>>>>>>  Name = " << mParamName << " Type = " << mParamType << " ZoneId = " << mParamZoneId << endl;
329
 
         break;
 
329
         break;
330
330
 
331
331
      case kForwardAnyQuery:
332
332
      case kForwardWildcardAnyQuery:
333
 
         strncpy(mParamName, qname.c_str(), sizeof(mParamName));
 
333
         strncpy(mParamName, qname.c_str(), sizeof(mParamName));
334
334
         //cerr << ">>>>>>>>  Name = " << mParamName << endl;
335
 
         break;
 
335
         break;
336
336
   }
337
337
 
338
338
   //
596
596
  
597
597
      void declareArguments(const string &suffix="")
598
598
      {
599
 
         declare(suffix,"server","Server","powerdns");
600
 
         declare(suffix,"user","User","powerdns");
601
 
         declare(suffix,"password","Password","powerdns");
 
599
         declare(suffix,"server","Server","powerdns");
 
600
         declare(suffix,"user","User","powerdns");
 
601
         declare(suffix,"password","Password","powerdns");
602
602
      }
603
603
      
604
604
      DNSBackend *make(const string &suffix="")
605
605
      {
606
 
         return new DB2Backend(suffix);
 
606
         return new DB2Backend(suffix);
607
607
      }
608
608
};
609
609
 
615
615
 
616
616
      Loader()
617
617
      {
618
 
         BackendMakers().report(new DB2Factory);
619
 
         L << Logger::Notice << kBackendName << " This is the DB2 module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl;
 
618
         BackendMakers().report(new DB2Factory);
 
619
         L << Logger::Notice << kBackendName << " This is the DB2 module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl;
620
620
      }
621
621
};
622
622