Alexandre Julliard : qmgr: Ignore errors when registering the service.

Alexandre Julliard julliard at winehq.org
Mon Feb 25 06:51:03 CST 2008


Module: wine
Branch: master
Commit: 84cf9caa7578c821a2e65518f2e6b4033e55e9bf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=84cf9caa7578c821a2e65518f2e6b4033e55e9bf

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Feb 25 12:17:40 2008 +0100

qmgr: Ignore errors when registering the service.

---

 dlls/qmgr/qmgr_main.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/dlls/qmgr/qmgr_main.c b/dlls/qmgr/qmgr_main.c
index 0af2007..2a21a28 100644
--- a/dlls/qmgr/qmgr_main.c
+++ b/dlls/qmgr/qmgr_main.c
@@ -113,7 +113,6 @@ static HRESULT register_service(BOOL do_register)
     static const WCHAR path[] = { 's','v','c','h','o','s','t','.','e','x','e',
                                   ' ','-','k',' ','n','e','t','s','v','c','s', 0 };
     SC_HANDLE scm, service;
-    HRESULT hr = S_OK;
 
     scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
     if (!scm)
@@ -129,14 +128,12 @@ static HRESULT register_service(BOOL do_register)
 
 
     CloseServiceHandle(scm);
-    if (!service)
-        return SELFREG_E_CLASS;
-
-    if (!do_register)
-        hr = DeleteService(service) ? S_OK : SELFREG_E_CLASS;
-
-    CloseServiceHandle(service);
-    return hr;
+    if (service)
+    {
+        if (!do_register) DeleteService(service);
+        CloseServiceHandle(service);
+    }
+    return S_OK;
 }
 
 /* Use an INF file to register or unregister the DLL */




More information about the wine-cvs mailing list