s3-spoolss: Added a sharename arg to winreg_update_printer.
authorAndreas Schneider <asn@samba.org>
Tue, 4 May 2010 09:37:42 +0000 (11:37 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 5 May 2010 15:32:59 +0000 (17:32 +0200)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/rpc_server/srv_spoolss_util.c
source3/rpc_server/srv_spoolss_util.h

index f04e5dec976fee928538d4b65abd37f3cf027134..3ddf7eb7151677c57cfd499e8a4343d4990c40ea 100644 (file)
@@ -1536,6 +1536,7 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
 
        result = winreg_update_printer(tmp_ctx,
                                       server_info,
+                                      sharename,
                                       info2_mask,
                                       info2,
                                       devmode,
@@ -1557,6 +1558,7 @@ done:
 
 WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
                             struct auth_serversupplied_info *server_info,
+                            const char *sharename,
                             uint32_t info2_mask,
                             struct spoolss_SetPrinterInfo2 *info2,
                             struct spoolss_DeviceMode *devmode,
@@ -1576,7 +1578,7 @@ WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
                return WERR_NOMEM;
        }
 
-       path = winreg_printer_data_keyname(tmp_ctx, info2->sharename);
+       path = winreg_printer_data_keyname(tmp_ctx, sharename);
        if (path == NULL) {
                TALLOC_FREE(tmp_ctx);
                return WERR_NOMEM;
index f883f20a456df41610bf7da52219eaa353297f59..fbb34bb1587e307962e4da56651630c74a5b523b 100644 (file)
@@ -85,6 +85,8 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
  *
  * @param[in]  server_info The server supplied session info.
  *
+ * @param[in]  sharename  The share name.
+ *
  * @param[in]  info2_mask A bitmask which defines which values should be set.
  *
  * @param[in]  info2    A SetPrinterInfo2 structure with the data to set.
@@ -98,6 +100,7 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
  */
 WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
                             struct auth_serversupplied_info *server_info,
+                            const char *sharename,
                             uint32_t info2_mask,
                             struct spoolss_SetPrinterInfo2 *info2,
                             struct spoolss_DeviceMode *devmode,