diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-26 23:04:19 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-26 23:04:19 +0000 |
commit | 9b683054751866af4fb2ac79c092392e31effaff (patch) | |
tree | e9648db6efbff69ff731c1df466f59fd21cc853e /source3/rpc_client/cli_atsvc.c | |
parent | 5e3bc7875656362770b0c9a2a45d2f83c985c6e5 (diff) | |
download | samba-9b683054751866af4fb2ac79c092392e31effaff.tar.gz samba-9b683054751866af4fb2ac79c092392e31effaff.tar.bz2 samba-9b683054751866af4fb2ac79c092392e31effaff.zip |
whoa. _major_ restructure of rpcclient. fixed some buuugs, created a few.
found out that getopt() _must_ have optind set to 0 before reuse.
still haven't decided what to do with the net* api yet...
(This used to be commit 29c480085e786905bfd92ea3cd93658f94e96e47)
Diffstat (limited to 'source3/rpc_client/cli_atsvc.c')
-rw-r--r-- | source3/rpc_client/cli_atsvc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/rpc_client/cli_atsvc.c b/source3/rpc_client/cli_atsvc.c index bebc4d0bc7..ba18a36313 100644 --- a/source3/rpc_client/cli_atsvc.c +++ b/source3/rpc_client/cli_atsvc.c @@ -128,7 +128,7 @@ enumerate scheduled jobs ****************************************************************************/ BOOL at_enum_jobs(struct cli_state *cli, uint16 fnum, char *server_name, uint32 *num_jobs, - AT_ENUM_INFO *jobs, fstring *commands) + AT_ENUM_INFO *jobs, char ***commands) { prs_struct rbuf; prs_struct buf; @@ -167,13 +167,18 @@ BOOL at_enum_jobs(struct cli_state *cli, uint16 fnum, { int i; - *num_jobs = r_e.num_entries; + *num_jobs = 0; memcpy(jobs, &r_e.info, r_e.num_entries * sizeof(AT_ENUM_INFO)); for (i = 0; i < r_e.num_entries; i++) { - unistr2_to_ascii(commands[i], &r_e.command[i], - sizeof(commands[i])); + fstring cmd; + unistr2_to_ascii(cmd, &r_e.command[i], sizeof(cmd)); + add_chars_to_array(num_jobs, commands, cmd); + } + if ((*num_jobs) != r_e.num_entries) + { + p = False; } } } |