Added patch to fix error handling in OpenSCManagerW (fixes testfailure in advapi32/service tests when named pipe messagemode is available).

This commit is contained in:
Sebastian Lackner
2015-05-08 21:55:25 +02:00
parent 7fd064ce86
commit d6a8a1d8a1
4 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
From 0f3d7e07b53bd1a7c8735bb2c0fa3da0b75dcb96 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 8 May 2015 21:53:30 +0200
Subject: advapi32: Fix error handling in OpenSCManagerW.
---
dlls/advapi32/service.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index 0eb0a47..111009d 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -868,8 +868,9 @@ SC_HANDLE WINAPI OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
DWORD r;
r = SERV_OpenSCManagerW(lpMachineName, lpDatabaseName, dwDesiredAccess, &handle);
- if (r!=ERROR_SUCCESS)
- SetLastError(r);
+
+ /* last error could still be ERROR_MORE_DATA, so set error unconditionally */
+ SetLastError(r);
return handle;
}
--
2.4.0