diff options
author | Stef Walter <stef@memberwebs.com> | 2008-06-09 19:21:43 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-06-09 19:21:43 +0000 |
commit | 3f65ea3cb042826f7343d80a2a1c048fba16edfa (patch) | |
tree | f71ac23a5bf8a9dd2b4ab15ccc5758bb95ef3083 /plugin/dnsnotify.c | |
parent | b9ecd6e5e5b87fe1c4dab960e92246772002dd6a (diff) |
Bug fixes.
Diffstat (limited to 'plugin/dnsnotify.c')
-rw-r--r-- | plugin/dnsnotify.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; |