s3: Lift the smbd_messaging_context from winreg_printer_deleteform1
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 08:41:54 +0000 (10:41 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:03:18 +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 33d318ea374701b001157f4b4dd5054862d36ed6..68167f3c260ca1f8a7e443d4fac7f32f5f76f72c 100644 (file)
@@ -7970,6 +7970,7 @@ WERROR _spoolss_DeleteForm(struct pipes_struct *p,
 
        status = winreg_printer_deleteform1(p->mem_ctx,
                                            p->server_info,
+                                           p->msg_ctx,
                                            form_name);
        if (!W_ERROR_IS_OK(status)) {
                return status;
index aea9a5a7027fabe33cb0186d299c14733e558909..6aa45da6fabd91d3bf33f1be3393898e65284258 100644 (file)
@@ -3445,6 +3445,7 @@ done:
 
 WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx,
                                  struct auth_serversupplied_info *server_info,
+                                 struct messaging_context *msg_ctx,
                                  const char *form_name)
 {
        uint32_t access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -3473,7 +3474,7 @@ WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx,
 
        result = winreg_printer_openkey(tmp_ctx,
                                        server_info,
-                                       smbd_messaging_context(),
+                                       msg_ctx,
                                        &winreg_pipe,
                                        TOP_LEVEL_CONTROL_FORMS_KEY,
                                        "",
@@ -3575,7 +3576,9 @@ WERROR winreg_printer_setform1(TALLOC_CTX *mem_ctx,
 
        /* If form_name != form->form_name then we renamed the form */
        if (strequal(form_name, form->form_name)) {
-               result = winreg_printer_deleteform1(tmp_ctx, server_info, form_name);
+               result = winreg_printer_deleteform1(tmp_ctx, server_info,
+                                                   smbd_messaging_context(),
+                                                   form_name);
                if (!W_ERROR_IS_OK(result)) {
                        DEBUG(0, ("winreg_printer_setform1: Could not open key %s: %s\n",
                                  TOP_LEVEL_CONTROL_FORMS_KEY, win_errstr(result)));
index 6a9c1d4af30363a341d8ebf0e1120b810fa3176e..2a6b0b20dec1255e240ab9449a092dc610963b44 100644 (file)
@@ -445,6 +445,7 @@ WERROR winreg_printer_enumforms1(TALLOC_CTX *mem_ctx,
  */
 WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx,
                                  struct auth_serversupplied_info *server_info,
+                                 struct messaging_context *msg_ctx,
                                  const char *form_name);
 
 /**