From b9fe8de0ff7d0a44c5d0169b552a673e3d225524 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Aug 2010 10:35:57 +0200 Subject: [PATCH] s3: Lift the smbd_messaging_context from winreg_printer_get_changeid --- source3/rpc_server/srv_spoolss_nt.c | 8 +++++++- source3/rpc_server/srv_spoolss_util.c | 3 ++- source3/rpc_server/srv_spoolss_util.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index c3da5544d6a..657fbd7d0b7 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3514,7 +3514,12 @@ static WERROR construct_printer_info0(TALLOC_CTX *mem_ctx, r->number_of_processors = 0x1; r->processor_type = PROCESSOR_INTEL_PENTIUM; /* 586 Pentium ? */ r->high_part_total_bytes = 0x0; - winreg_printer_get_changeid(mem_ctx, server_info, info2->sharename, &r->change_id); /* ChangeID in milliseconds*/ + + /* ChangeID in milliseconds*/ + winreg_printer_get_changeid(mem_ctx, server_info, + smbd_messaging_context(), + info2->sharename, &r->change_id); + r->last_error = WERR_OK; r->status = nt_printq_status(status.status); r->enumerate_network_printers = 0x0; @@ -8652,6 +8657,7 @@ WERROR _spoolss_GetPrinterDataEx(struct pipes_struct *p, result = winreg_printer_get_changeid(p->mem_ctx, p->server_info, + p->msg_ctx, printer, &changeid); if (!W_ERROR_IS_OK(result)) { diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c index 2f27c8d6732..af759b7f8cf 100644 --- a/source3/rpc_server/srv_spoolss_util.c +++ b/source3/rpc_server/srv_spoolss_util.c @@ -3145,6 +3145,7 @@ done: WERROR winreg_printer_get_changeid(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, const char *printer, uint32_t *pchangeid) { @@ -3172,7 +3173,7 @@ WERROR winreg_printer_get_changeid(TALLOC_CTX *mem_ctx, result = winreg_printer_openkey(tmp_ctx, server_info, - smbd_messaging_context(), + msg_ctx, &winreg_pipe, path, "", diff --git a/source3/rpc_server/srv_spoolss_util.h b/source3/rpc_server/srv_spoolss_util.h index efbdec40fea..92776158e90 100644 --- a/source3/rpc_server/srv_spoolss_util.h +++ b/source3/rpc_server/srv_spoolss_util.h @@ -383,6 +383,7 @@ WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx, */ WERROR winreg_printer_get_changeid(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info, + struct messaging_context *msg_ctx, const char *printer, uint32_t *pchangeid); -- 2.34.1