summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-09-08 17:34:02 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-09-08 17:34:02 -0400
commit0949239ce22537cd28ff5feed3e2ca9bd90a4a5c (patch)
tree74b3f2edde39017f2decac35a0d80d5007777de0 /src
parent62c237b39e3e5c3a983e8d7f1819ecde5ea20651 (diff)
downloadslapi-nis-0949239ce22537cd28ff5feed3e2ca9bd90a4a5c.tar.gz
slapi-nis-0949239ce22537cd28ff5feed3e2ca9bd90a4a5c.tar.xz
slapi-nis-0949239ce22537cd28ff5feed3e2ca9bd90a4a5c.zip
- rename sdn list manipulation functions in case they'll be needed
elsewhere later
Diffstat (limited to 'src')
-rw-r--r--src/format.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/format.c b/src/format.c
index 217d736..26abcd6 100644
--- a/src/format.c
+++ b/src/format.c
@@ -103,7 +103,7 @@ xmemdup(char *region, int size)
/* Maintain a DN list, which is list of distinguished names. */
static void
-format_free_dn_list(struct slapi_dn **list)
+format_free_sdn_list(struct slapi_dn **list)
{
unsigned int i;
for (i = 0; (list != NULL) && (list[i] != NULL); i++) {
@@ -113,7 +113,7 @@ format_free_dn_list(struct slapi_dn **list)
}
static struct slapi_dn **
-format_dup_dn_list(struct slapi_dn **list)
+format_dup_sdn_list(struct slapi_dn **list)
{
struct slapi_dn **ret;
unsigned int i;
@@ -131,7 +131,7 @@ format_dup_dn_list(struct slapi_dn **list)
}
static struct slapi_dn **
-format_add_dn_list(struct slapi_dn ***list, const char *dn)
+format_add_sdn_list(struct slapi_dn ***list, const char *dn)
{
struct slapi_dn **ret, *sdn;
unsigned int i;
@@ -169,7 +169,7 @@ format_free_ref_attr_list(struct format_ref_attr_list **list)
for (i = 0; (list != NULL) && (list[i] != NULL); i++) {
for (j = 0; j < list[i]->n_links; j++) {
free(list[i]->links[j].attribute);
- format_free_dn_list(list[i]->links[j].base_sdn_list);
+ format_free_sdn_list(list[i]->links[j].base_sdn_list);
}
free(list[i]->links);
free(list[i]->set);
@@ -183,7 +183,7 @@ struct format_ref_attr_list **
format_dup_ref_attr_list(struct format_ref_attr_list **list)
{
struct format_ref_attr_list **ret;
- struct slapi_dn **dn_list;
+ struct slapi_dn **sdn_list;
unsigned int i;
int j;
for (i = 0; (list != NULL) && (list[i] != NULL); i++) {
@@ -211,9 +211,9 @@ format_dup_ref_attr_list(struct format_ref_attr_list **list)
format_free_ref_attr_list(ret);
return NULL;
}
- dn_list = list[i]->links[j].base_sdn_list;
+ sdn_list = list[i]->links[j].base_sdn_list;
ret[i]->links[j].base_sdn_list =
- format_dup_dn_list(dn_list);
+ format_dup_sdn_list(sdn_list);
ret[i]->n_links++;
}
ret[i]->group = strdup(list[i]->group);
@@ -254,7 +254,7 @@ format_add_ref_attr_list(struct format_ref_attr_list ***list,
const char **names)
{
struct format_ref_attr_list **ret;
- struct slapi_dn **dn_list;
+ struct slapi_dn **sdn_list;
unsigned int i;
int j;
if (format_find_ref_attr_list(*list, group, set, names) != NULL) {
@@ -287,9 +287,9 @@ format_add_ref_attr_list(struct format_ref_attr_list ***list,
format_free_ref_attr_list(ret);
return *list;
}
- dn_list = (*list)[i]->links[j].base_sdn_list;
+ sdn_list = (*list)[i]->links[j].base_sdn_list;
ret[i]->links[j].base_sdn_list =
- format_dup_dn_list(dn_list);
+ format_dup_sdn_list(sdn_list);
ret[i]->n_links++;
}
ret[i]->group = strdup((*list)[i]->group);
@@ -1037,7 +1037,7 @@ format_derefx(struct plugin_state *state, Slapi_PBlock *pb, Slapi_Entry *e,
these = NULL;
choices = NULL;
dn = slapi_entry_get_dn(e);
- format_add_dn_list(&these, dn);
+ format_add_sdn_list(&these, dn);
/* For the first N-1 links, read the contents of the named attribute
* from each entry we're examining at this point, and use the values
@@ -1053,8 +1053,8 @@ format_derefx(struct plugin_state *state, Slapi_PBlock *pb, Slapi_Entry *e,
/* For heuristic use later, note the parent of the
* entry which we've just found. */
dn = slapi_sdn_get_dn(these[j]);
- format_add_dn_list(&list->links[i].base_sdn_list,
- slapi_dn_parent(dn));
+ format_add_sdn_list(&list->links[i].base_sdn_list,
+ slapi_dn_parent(dn));
/* Pull up the named entry. */
entry = NULL;
wrap_search_internal_get_entry(these[j], attrs, &entry,
@@ -1094,11 +1094,11 @@ format_derefx(struct plugin_state *state, Slapi_PBlock *pb, Slapi_Entry *e,
#if 1
/* Let's visit the named entry this
* time, in case we're nesting. */
- format_add_dn_list(&these, cvalue);
+ format_add_sdn_list(&these, cvalue);
#endif
/* We need to visit the named entry
* next time. */
- format_add_dn_list(&next, cvalue);
+ format_add_sdn_list(&next, cvalue);
} else {
/* Get the value. */
bval = slapi_value_get_berval(value);
@@ -1115,7 +1115,7 @@ format_derefx(struct plugin_state *state, Slapi_PBlock *pb, Slapi_Entry *e,
}
/* Replace the list of entries we're examining now with the
* list of entries we need to examine next. */
- format_free_dn_list(these);
+ format_free_sdn_list(these);
these = next;
next = NULL;
}