From 3f65ea3cb042826f7343d80a2a1c048fba16edfa Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 9 Jun 2008 19:21:43 +0000 Subject: Bug fixes. --- plugin/dnsnotify.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugin/dnsnotify.c') diff --git a/plugin/dnsnotify.c b/plugin/dnsnotify.c index 132726f..d610414 100644 --- a/plugin/dnsnotify.c +++ b/plugin/dnsnotify.c @@ -41,7 +41,7 @@ load_soa_ns_attributes (const char *dn, char **soa_result, char ***ns_result) Slapi_PBlock *pb; Slapi_Attr *attr; LDAPControl *ctrl; - char *attrs[2]; + char *attrs[3]; char *soa, **ns; int rc, code, num, i; @@ -52,7 +52,8 @@ load_soa_ns_attributes (const char *dn, char **soa_result, char ***ns_result) ctrl = NULL; /* No controls */ attrs[0] = (char*)dnsnotify_soa_attribute; - attrs[1] = NULL; + attrs[1] = (char*)dnsnotify_ns_attribute; + attrs[2] = NULL; trace ("performing internal search"); @@ -77,6 +78,7 @@ load_soa_ns_attributes (const char *dn, char **soa_result, char ***ns_result) return_val_if_fail (entries, 0); soa = NULL; + ns = NULL; if (entries[0]) { if (slapi_entry_attr_find (entries[0], (char*)dnsnotify_soa_attribute, &attr) >= 0 && attr && slapi_attr_get_values (attr, &values) >= 0 && values && values[0]) { @@ -108,7 +110,7 @@ load_soa_ns_attributes (const char *dn, char **soa_result, char ***ns_result) slapi_pblock_destroy (pb); /* Only proceed if we have all the data we need */ - if (soa && soa[0] && ns && ns[0] && ns[0]) { + if (soa && soa[0] && ns && ns[0]) { *soa_result = soa; *ns_result = ns; return 1; -- cgit v1.2.3