diff options
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/nt_printing.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 7fc55c3098..92aa320b71 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1845,7 +1845,22 @@ void nt_printer_remove(TALLOC_CTX *mem_ctx, result = winreg_delete_printer_key_internal(mem_ctx, session_info, msg_ctx, printer, ""); if (!W_ERROR_IS_OK(result)) { - DEBUG(0, ("nt_printer_remove: failed to remove printer %s", - printer)); + DEBUG(0, ("nt_printer_remove: failed to remove printer %s: " + "%s\n", printer, win_errstr(result))); + } +} + +void nt_printer_add(TALLOC_CTX *mem_ctx, + const struct auth_session_info *session_info, + struct messaging_context *msg_ctx, + const char *printer) +{ + WERROR result; + + result = winreg_create_printer_internal(mem_ctx, session_info, msg_ctx, + printer); + if (!W_ERROR_IS_OK(result)) { + DEBUG(0, ("nt_printer_add: failed to add printer %s: %s\n", + printer, win_errstr(result))); } } |