summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_printer.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-08-02 06:24:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:19 -0500
commitfefbaf2bca42569f6a3cc8b68578200159409ec9 (patch)
treef8e869b1b1f82b2d0afd6da6212ae680c5ee8d33 /source3/utils/net_rpc_printer.c
parent0d40d4f8db40b7bf116c28cf938ab2b5c1e656d7 (diff)
downloadsamba-fefbaf2bca42569f6a3cc8b68578200159409ec9.tar.gz
samba-fefbaf2bca42569f6a3cc8b68578200159409ec9.tar.bz2
samba-fefbaf2bca42569f6a3cc8b68578200159409ec9.zip
r8911: cosmetic fixes.
Guenther (This used to be commit bf67a8611491ed748c6975787ce2f0572586a3c6)
Diffstat (limited to 'source3/utils/net_rpc_printer.c')
-rw-r--r--source3/utils/net_rpc_printer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index e2080cdc28..b47f43b178 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -780,8 +780,10 @@ copy_print_driver_3(TALLOC_CTX *mem_ctx,
return nt_status;
while (valid) {
+
rpcstr_pull(dependentfiles, i1->dependentfiles+length, sizeof(dependentfiles), -1, STR_TERMINATE);
- length+=strlen(dependentfiles)+1;
+ length += strlen(dependentfiles)+1;
+
if (strlen(dependentfiles) > 0) {
nt_status = net_copy_driverfile(mem_ctx,
@@ -1468,7 +1470,7 @@ NTSTATUS rpc_printer_migrate_security_internals(const DOM_SID *domain_sid, const
DEBUG(3,("copying printer ACLs\n"));
/* connect destination PI_SPOOLSS */
- nt_status = connect_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
+ nt_status = connect_dst_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
@@ -1617,7 +1619,7 @@ NTSTATUS rpc_printer_migrate_forms_internals(const DOM_SID *domain_sid, const ch
DEBUG(3,("copying forms\n"));
/* connect destination PI_SPOOLSS */
- nt_status = connect_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
+ nt_status = connect_dst_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
@@ -1797,7 +1799,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(const DOM_SID *domain_sid, const
DEBUG(3,("copying printer-drivers\n"));
- nt_status = connect_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
+ nt_status = connect_dst_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
@@ -1806,7 +1808,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(const DOM_SID *domain_sid, const
nt_status = connect_to_service(&cli_share_src, &cli->dest_ip,
cli->desthost, "print$", "A:");
if (!NT_STATUS_IS_OK(nt_status))
- return nt_status;
+ goto done;
got_src_driver_share = True;
@@ -1826,7 +1828,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(const DOM_SID *domain_sid, const
goto done;
}
- if (!num_printers) {
+ if (num_printers == 0) {
printf ("no printers found on server.\n");
nt_status = NT_STATUS_OK;
goto done;
@@ -2002,13 +2004,13 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid, const
DEBUG(3,("copying printers\n"));
/* connect destination PI_SPOOLSS */
- nt_status = connect_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
+ nt_status = connect_dst_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
/* enum printers */
- if (!get_printer_info(cli, mem_ctx, 2, argc, argv, &num_printers, &ctr_enum)) {
+ if (!get_printer_info(cli, mem_ctx, level, argc, argv, &num_printers, &ctr_enum)) {
nt_status = NT_STATUS_UNSUCCESSFUL;
goto done;
}
@@ -2169,7 +2171,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(const DOM_SID *domain_sid, const
DEBUG(3,("copying printer settings\n"));
/* connect destination PI_SPOOLSS */
- nt_status = connect_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
+ nt_status = connect_dst_pipe(&cli_dst, PI_SPOOLSS, &got_dst_spoolss_pipe);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;