From fa3264f89b1de8c7a284b8bc4469a80db7c6084f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 1 Oct 2010 06:08:47 +0200 Subject: s3-net: better handle obscure 0x80070002 error reply when trying to update an not yet published printer. Guenther --- source3/utils/net_rpc_printer.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/utils/net_rpc_printer.c') diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 79556669672..0396e2a601e 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -1322,9 +1322,13 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_ 0, /* command */ &result); - if (!W_ERROR_IS_OK(result) && (W_ERROR_V(result) != W_ERROR_V(WERR_IO_PENDING))) { - printf(_("cannot set printer-info: %s\n"), - win_errstr(result)); + if (!W_ERROR_IS_OK(result) && !W_ERROR_EQUAL(result, WERR_IO_PENDING)) { + if ((action == DSPRINT_UPDATE) && W_ERROR_EQUAL(result, W_ERROR(0x80070002))) { + printf(_("printer not published yet\n")); + } else { + printf(_("cannot set printer-info: %s\n"), + win_errstr(result)); + } goto done; } -- cgit