s3: Lift the smbd_messaging_context from winreg_del_driver
authorVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 08:54:01 +0000 (10:54 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Aug 2010 14:03:19 +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 43ae480d24aadedca94dd45d540e3d0b76840a65..4c660374ae5a834546099ed3870d9e62b21dd5cc 100644 (file)
@@ -1882,6 +1882,7 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p,
 
                        status = winreg_del_driver(p->mem_ctx,
                                                   p->server_info,
+                                                  p->msg_ctx,
                                                   info_win2k, 3);
                        talloc_free(info_win2k);
 
@@ -1892,7 +1893,8 @@ WERROR _spoolss_DeletePrinterDriver(struct pipes_struct *p,
                }
        }
 
-       status = winreg_del_driver(p->mem_ctx, p->server_info, info, version);
+       status = winreg_del_driver(p->mem_ctx, p->server_info, p->msg_ctx,
+                                  info, version);
 
 done:
        talloc_free(info);
@@ -2017,7 +2019,7 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
                        /* remove the Win2k driver first*/
 
                        status = winreg_del_driver(info, p->server_info,
-                                                  info_win2k, 3);
+                                                  p->msg_ctx, info_win2k, 3);
 
                        /* this should not have failed---if it did, report to client */
 
@@ -2037,7 +2039,8 @@ WERROR _spoolss_DeletePrinterDriverEx(struct pipes_struct *p,
                }
        }
 
-       status = winreg_del_driver(info, p->server_info, info, version);
+       status = winreg_del_driver(info, p->server_info, p->msg_ctx, info,
+                                  version);
        if (!W_ERROR_IS_OK(status)) {
                goto done;
        }
index 668fec7bb104717402643c482539e9362ef28a28..05ee92f65a3977bbef7fc81eb13e04725cd8e382 100644 (file)
@@ -4263,6 +4263,7 @@ done:
 
 WERROR winreg_del_driver(TALLOC_CTX *mem_ctx,
                         struct auth_serversupplied_info *server_info,
+                        struct messaging_context *msg_ctx,
                         struct spoolss_DriverInfo8 *info8,
                         uint32_t version)
 {
@@ -4284,7 +4285,7 @@ WERROR winreg_del_driver(TALLOC_CTX *mem_ctx,
        /* test that the key exists */
        result = winreg_printer_opendriver(tmp_ctx,
                                           server_info,
-                                          smbd_messaging_context(),
+                                          msg_ctx,
                                           info8->driver_name,
                                           info8->architecture,
                                           version,
index ef2d8be518f3e22ba965f5d9a6a936e2cae687d2..6cd75561752c87e954e81fce60efc6407b7e531f 100644 (file)
@@ -559,6 +559,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx,
 
 WERROR winreg_del_driver(TALLOC_CTX *mem_ctx,
                         struct auth_serversupplied_info *server_info,
+                        struct messaging_context *msg_ctx,
                         struct spoolss_DriverInfo8 *info8,
                         uint32_t version);