diff options
author | Günther Deschner <gd@samba.org> | 2010-10-01 06:08:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-10-01 08:33:46 +0200 |
commit | fa3264f89b1de8c7a284b8bc4469a80db7c6084f (patch) | |
tree | 3cd971a8ff4e7a6915947e0472d6e6cfc339d518 /source3/utils | |
parent | 21576e3f8c32878910460bf9575c200ad93d682a (diff) | |
download | samba-fa3264f89b1de8c7a284b8bc4469a80db7c6084f.tar.gz samba-fa3264f89b1de8c7a284b8bc4469a80db7c6084f.tar.bz2 samba-fa3264f89b1de8c7a284b8bc4469a80db7c6084f.zip |
s3-net: better handle obscure 0x80070002 error reply when trying to update an
not yet published printer.
Guenther
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_printer.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 7955666967..0396e2a601 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; } |