s3: Lift the smbd_messaging_context from winreg_printer_get_changeid
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 08:35:57 +0000 (10:35 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:03:17 +0000 (16:03 +0200)
source3/rpc_server/srv_spoolss_nt.c
source3/rpc_server/srv_spoolss_util.c
source3/rpc_server/srv_spoolss_util.h

index c3da5544d6aed6087ced20ead1d590af0d68a7e4..657fbd7d0b77baf75b7467d9297226d41ccde6c3 100644 (file)
@@ -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)) {
index 2f27c8d673299b06a8a4bb543db7fec8543a34ba..af759b7f8cfe4b17cffe9dc17bee3a10570823bd 100644 (file)
@@ -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,
                                        "",
index efbdec40feae5781148913d72c6f590f1ab5c408..92776158e90fc6ac53cbdbe6b2502fd5035336a9 100644 (file)
@@ -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);