summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2008-07-09 10:39:24 +0200
committerGünther Deschner <gd@samba.org>2008-07-15 22:29:02 +0200
commitb3152fb26849fa90347b315adbbebf57366c9927 (patch)
treed816ed5f6c709d7173c7f3e15ef7edb9aa61e16a /source3/lib/netapi
parentfc6216b2da1087065c26e874058de74ced692fcc (diff)
downloadsamba-b3152fb26849fa90347b315adbbebf57366c9927.tar.gz
samba-b3152fb26849fa90347b315adbbebf57366c9927.tar.bz2
samba-b3152fb26849fa90347b315adbbebf57366c9927.zip
netapi: Correctly increase idx when displaying user information
(This used to be commit 5fad9de2507b88820149def31faa28e5e45f7b5f)
Diffstat (limited to 'source3/lib/netapi')
-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) {