s3-spoolss: make sure to return success in winreg_get_driver_list() for a
authorGünther Deschner <gd@samba.org>
Mon, 26 Apr 2010 19:02:12 +0000 (21:02 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 5 May 2010 16:17:32 +0000 (18:17 +0200)
non-existing architecture / version combination.

Guenther

source3/rpc_server/srv_spoolss_util.c

index ecb583c3e45ed726dd76238ec83409ab98f1f90f..afe86caf76e2951f8a2f5d0d3c69aa7dd7d98008 100644 (file)
@@ -4026,6 +4026,9 @@ WERROR winreg_get_driver_list(TALLOC_CTX *mem_ctx,
        TALLOC_CTX *tmp_ctx;
        WERROR result;
 
+       *num_drivers = 0;
+       *drivers_p = NULL;
+
        ZERO_STRUCT(hive_hnd);
        ZERO_STRUCT(key_hnd);
 
@@ -4049,6 +4052,7 @@ WERROR winreg_get_driver_list(TALLOC_CTX *mem_ctx,
                DEBUG(5, ("winreg_get_driver_list: "
                          "Could not open key (%s,%u): %s\n",
                          architecture, version, win_errstr(result)));
+               result = WERR_OK;
                goto done;
        }