summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2007-11-08 14:13:35 -0500
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2007-11-08 14:13:35 -0500
commit6b56f05e2616725f8438e544350f72d077e56321 (patch)
tree23fba41474c4930c714834e0adce4d0896d03e92 /src/plugin.c
parent96254789dcc5015472d280813b10121f494b32e9 (diff)
downloadslapi-nis-6b56f05e2616725f8438e544350f72d077e56321.tar.gz
slapi-nis-6b56f05e2616725f8438e544350f72d077e56321.tar.xz
slapi-nis-6b56f05e2616725f8438e544350f72d077e56321.zip
okay, _now_ it actually returns real data
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 31067da..f5dcc1e 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -19,7 +19,7 @@
#include <dirsrv/slapi-plugin.h>
#define PACKAGE_VERSION "0.0"
-#define PORT 2380
+#define PORT 3280
/* the module initialization function */
static Slapi_PluginDesc
@@ -148,19 +148,16 @@ cb_entry(Slapi_Entry *e, void *callback_data)
write(data->client, "]\n", 2);
values = NULL;
if (slapi_attr_get_valueset(attr, &values) == 0) {
- i = slapi_valueset_count(values);
- while (i > 0) {
- i--;
- value = NULL;
- if (slapi_valueset_next_value(values, i,
- &value) == 0) {
- val = slapi_value_get_berval(value);
- if (val != NULL) {
- write(data->client,
- val->bv_val, val->bv_len);
- write(data->client, "\n", 1);
- }
+ i = slapi_valueset_first_value(values, &value);
+ while (i != -1) {
+ val = slapi_value_get_berval(value);
+ if (val != NULL) {
+ write(data->client,
+ val->bv_val, val->bv_len);
+ write(data->client, "\n", 1);
}
+ i = slapi_valueset_next_value(values, i,
+ &value);
}
}
}