s3: Lift the smbd_messaging_context from winreg_printer_update_changeid
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 08:34:00 +0000 (10:34 +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 06c1e55f0d2cd844dfcbef76ecfd3b2dc8ced523..c3da5544d6aed6087ced20ead1d590af0d68a7e4 100644 (file)
@@ -1368,6 +1368,7 @@ void do_drv_upgrade_printer(struct messaging_context *msg,
                /* all we care about currently is the change_id */
                result = winreg_printer_update_changeid(tmp_ctx,
                                                        server_info,
                /* all we care about currently is the change_id */
                result = winreg_printer_update_changeid(tmp_ctx,
                                                        server_info,
+                                                       msg,
                                                        pinfo2->printername);
 
                if (!W_ERROR_IS_OK(result)) {
                                                        pinfo2->printername);
 
                if (!W_ERROR_IS_OK(result)) {
@@ -7918,6 +7919,7 @@ WERROR _spoolss_AddForm(struct pipes_struct *p,
 
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
 
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
+                                                       p->msg_ctx,
                                                        lp_const_servicename(snum));
                if (!W_ERROR_IS_OK(status)) {
                        return status;
                                                        lp_const_servicename(snum));
                if (!W_ERROR_IS_OK(status)) {
                        return status;
@@ -7976,6 +7978,7 @@ WERROR _spoolss_DeleteForm(struct pipes_struct *p,
 
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
 
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
+                                                       p->msg_ctx,
                                                        lp_const_servicename(snum));
                if (!W_ERROR_IS_OK(status)) {
                        return status;
                                                        lp_const_servicename(snum));
                if (!W_ERROR_IS_OK(status)) {
                        return status;
@@ -8040,6 +8043,7 @@ WERROR _spoolss_SetForm(struct pipes_struct *p,
 
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
 
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
+                                                       p->msg_ctx,
                                                        lp_const_servicename(snum));
                if (!W_ERROR_IS_OK(status)) {
                        return status;
                                                        lp_const_servicename(snum));
                if (!W_ERROR_IS_OK(status)) {
                        return status;
@@ -8792,6 +8796,7 @@ WERROR _spoolss_SetPrinterDataEx(struct pipes_struct *p,
 
                result = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
 
                result = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
+                                                       p->msg_ctx,
                                                        lp_const_servicename(snum));
 
        }
                                                        lp_const_servicename(snum));
 
        }
@@ -8846,6 +8851,7 @@ WERROR _spoolss_DeletePrinterDataEx(struct pipes_struct *p,
        if (W_ERROR_IS_OK(status)) {
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
        if (W_ERROR_IS_OK(status)) {
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
+                                                       p->msg_ctx,
                                                        printer);
        }
 
                                                        printer);
        }
 
@@ -8960,6 +8966,7 @@ WERROR _spoolss_DeletePrinterKey(struct pipes_struct *p,
        if (W_ERROR_IS_OK(status)) {
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
        if (W_ERROR_IS_OK(status)) {
                status = winreg_printer_update_changeid(p->mem_ctx,
                                                        p->server_info,
+                                                       p->msg_ctx,
                                                        printer);
        }
 
                                                        printer);
        }
 
index 3eaa759798fbde730135f6fdb17a053c050ead63..2f27c8d673299b06a8a4bb543db7fec8543a34ba 100644 (file)
@@ -3079,6 +3079,7 @@ done:
 
 WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx,
                                      struct auth_serversupplied_info *server_info,
 
 WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx,
                                      struct auth_serversupplied_info *server_info,
+                                     struct messaging_context *msg_ctx,
                                      const char *printer)
 {
        uint32_t access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
                                      const char *printer)
 {
        uint32_t access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -3104,7 +3105,7 @@ WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx,
 
        result = winreg_printer_openkey(tmp_ctx,
                                        server_info,
 
        result = winreg_printer_openkey(tmp_ctx,
                                        server_info,
-                                       smbd_messaging_context(),
+                                       msg_ctx,
                                        &winreg_pipe,
                                        path,
                                        "",
                                        &winreg_pipe,
                                        path,
                                        "",
index 2283624ef8172e1baab6526351a2bf409b6419cf..efbdec40feae5781148913d72c6f590f1ab5c408 100644 (file)
@@ -364,6 +364,7 @@ WERROR winreg_delete_printer_key(TALLOC_CTX *mem_ctx,
  */
 WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx,
                                      struct auth_serversupplied_info *server_info,
  */
 WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx,
                                      struct auth_serversupplied_info *server_info,
+                                     struct messaging_context *msg_ctx,
                                      const char *printer);
 
 /**
                                      const char *printer);
 
 /**