diff options
author | Internet Software Consortium, Inc <@isc.org> | 2007-09-07 14:15:23 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2007-09-07 14:15:23 -0600 |
commit | 708dfaae929e0746a1e6fb5100d2c74036e45adf (patch) | |
tree | 8e41d12e0a398d83e4b055867ea794f50d3dc337 /contrib/sdb/ldap/zone2ldap.c | |
parent | 00fa0dd5b9bb17deb8d2e96a2bc4234abaa9d5ac (diff) | |
download | bind9-708dfaae929e0746a1e6fb5100d2c74036e45adf.tar.gz |
9.3.0beta2
Diffstat (limited to 'contrib/sdb/ldap/zone2ldap.c')
-rw-r--r-- | contrib/sdb/ldap/zone2ldap.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/contrib/sdb/ldap/zone2ldap.c b/contrib/sdb/ldap/zone2ldap.c index 90028b6d..badc06ce 100644 --- a/contrib/sdb/ldap/zone2ldap.c +++ b/contrib/sdb/ldap/zone2ldap.c @@ -20,8 +20,6 @@ #include <getopt.h> #include <isc/buffer.h> -#include <isc/entropy.h> -#include <isc/hash.h> #include <isc/mem.h> #include <isc/print.h> #include <isc/result.h> @@ -108,8 +106,7 @@ debug = 1; int main (int *argc, char **argv) { - isc_mem_t *mctx = NULL; - isc_entropy_t *ectx = NULL; + isc_mem_t *isc_ctx = NULL; isc_result_t result; char *basedn; ldap_info *tmp; @@ -188,15 +185,9 @@ main (int *argc, char **argv) if (debug) printf ("Initializing ISC Routines, parsing zone file\n"); - result = isc_mem_create (0, 0, &mctx); + result = isc_mem_create (0, 0, &isc_ctx); isc_result_check (result, "isc_mem_create"); - result = isc_entropy_create(mctx, &ectx); - isc_result_check (result, "isc_entropy_create"); - - result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE); - isc_result_check (result, "isc_hash_create"); - isc_buffer_init (&buff, argzone, strlen (argzone)); isc_buffer_add (&buff, strlen (argzone)); dns_fixedname_init (&fixedzone); @@ -204,8 +195,9 @@ main (int *argc, char **argv) result = dns_name_fromtext (zone, &buff, dns_rootname, ISC_FALSE, NULL); isc_result_check (result, "dns_name_fromtext"); - result = dns_db_create (mctx, "rbt", zone, dns_dbtype_zone, - dns_rdataclass_in, 0, NULL, &db); + result = + dns_db_create (isc_ctx, "rbt", zone, dns_dbtype_zone, dns_rdataclass_in, + 0, NULL, &db); isc_result_check (result, "dns_db_create"); result = dns_db_load (db, zonefile); @@ -321,14 +313,9 @@ main (int *argc, char **argv) add_ldap_values (tmp); } - if (debug) +if (debug) printf("Operation Complete.\n"); - /* Cleanup */ - isc_hash_destroy(); - isc_entropy_detach(&ectx); - isc_mem_destroy(&mctx); - return 0; } |