summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/examples
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/netapi/examples')
-rw-r--r--source3/lib/netapi/examples/user/user_dispinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/netapi/examples/user/user_dispinfo.c b/source3/lib/netapi/examples/user/user_dispinfo.c
index 9f862505aa..c7d3112d71 100644
--- a/source3/lib/netapi/examples/user/user_dispinfo.c
+++ b/source3/lib/netapi/examples/user/user_dispinfo.c
@@ -78,11 +78,13 @@ int main(int argc, const char **argv)
if (status == 0 || status == ERROR_MORE_DATA) {
user = (struct NET_DISPLAY_USER *)buffer;
for (i=0; i<entries_read; i++) {
- printf("user %d: %s\n", i, user->usri1_name);
+ printf("user %d: %s\n", i + idx,i
+ user->usri1_name);
user++;
}
NetApiBufferFree(buffer);
}
+ idx += entries_read;
} while (status == ERROR_MORE_DATA);
if (status != 0) {