From ae9b41efc65d39ba3ce2ef626ba5e58efffb2a84 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Fri, 19 Nov 2010 16:16:48 -0500 Subject: - more debug logging --- src/back-shr.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'src/back-shr.c') diff --git a/src/back-shr.c b/src/back-shr.c index 8380046..78e0af4 100644 --- a/src/back-shr.c +++ b/src/back-shr.c @@ -796,7 +796,7 @@ backend_shr_update_references_cb(const char *group, const char *set, struct format_ref_attr_list_link *this_attr_link, *prev_attr_link; struct format_ref_attr_list_link *next_attr_link; const char *ndn, *dn; - int i, j, k, l, disposition, buffer_flags, n_ref_attrs; + int i, j, k, l, disposition, buffer_flags, n_ref_attrs, scope; set_data = backend_data; cbdata = cbdata_ptr; @@ -943,13 +943,19 @@ backend_shr_update_references_cb(const char *group, const char *set, } /* Search for entries which would be predecessors in * the path to this entry. */ - for (k = 0; these_entries[k] != 0; k++) { + for (k = 0; these_entries[k] != NULL; k++) { + scope = LDAP_SCOPE_ONELEVEL; slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, "searching for references to " - "\"%s\" (link=%d)\n", + "\"%s\" (link=%d, " + "attributes=\"%s\",\"%s\")\n", slapi_sdn_get_ndn(these_entries[k]), - j); + j, + these_attrs[0] ? + these_attrs[0] : "", + prev_attrs[0] ? + prev_attrs[0] : ""); /* Search for entries at this point in the * chain which point to this entry in the * chain (which we started with the entry @@ -965,12 +971,13 @@ backend_shr_update_references_cb(const char *group, const char *set, slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, "searching under " - "\"%s\" for \"%s\"\n", + "\"%s\" for \"%s\" " + "with scope %d\n", slapi_sdn_get_ndn(these_bases[l]), - filter); + filter, scope); slapi_search_internal_set_pb(cbdata->pb, slapi_sdn_get_ndn(these_bases[l]), - LDAP_SCOPE_ONELEVEL, + scope, filter, NULL, FALSE, @@ -1002,12 +1009,13 @@ backend_shr_update_references_cb(const char *group, const char *set, slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, "searching from \"%s\"" - " for \"%s\"\n", + " for \"%s\" with " + "scope %d\n", slapi_sdn_get_ndn(prev_bases[l]), - filter); + filter, scope); slapi_search_internal_set_pb(cbdata->pb, slapi_sdn_get_ndn(prev_bases[l]), - LDAP_SCOPE_ONELEVEL, + scope, filter, NULL, FALSE, -- cgit