summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-08-06 13:49:01 +0200
committerAndreas Schneider <asn@samba.org>2010-08-06 14:20:09 +0200
commit043c6f46583fac13588baf207582a08cfa802a28 (patch)
tree2d499f7850370147dc3207a8efdb5e98d55ef7d7
parent33d1879d5b50e2d98c1bb13b835e7cfb178e3336 (diff)
downloadsamba-043c6f46583fac13588baf207582a08cfa802a28.tar.gz
samba-043c6f46583fac13588baf207582a08cfa802a28.tar.bz2
samba-043c6f46583fac13588baf207582a08cfa802a28.zip
s3-spoolss: Fixed setting driver version correctly.
We are in a loop here, so setting tmp to 0 at the beginning of each iteration sets info8->version to 0 if we enumerate over another value.
-rw-r--r--source3/rpc_server/srv_spoolss_util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c
index 076e2da503..7dc164c263 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -4053,8 +4053,10 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx,
result = winreg_enumval_to_dword(info8, v,
"Version",
&tmp);
+ if (NT_STATUS_IS_OK(result)) {
+ info8->version = (enum spoolss_DriverOSVersion) tmp;
+ }
CHECK_ERROR(result);
- info8->version = tmp;
result = winreg_enumval_to_sz(info8, v,
"Driver",