Improve error handling in scmdatabase_autostart_services.

Gerald Pfeifer gerald at pfeifer.com
Sat Apr 24 09:21:31 CDT 2010


I noticed that we are not using the error code coming from service_start, 
and indeed there was a FIXME there already.  Would it make sense to handle
this (at least) somehow like the patch below?

Gerald

---
 programs/services/services.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/programs/services/services.c b/programs/services/services.c
index a5eb2f7..bc2380e 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -266,7 +266,8 @@ static void scmdatabase_autostart_services(struct scmdatabase *db)
         argv[0] = service->name;
         argv[1] = NULL;
         err = service_start(service, 1, argv);
-        /* FIXME: do something if the service failed to start */
+        if (err != ERROR_SUCCESS)
+            WINE_ERR("Failed to start service %s\n", wine_dbgstr_w(service->name));
         release_service(service);
     }
 
-- 
1.6.6.2



More information about the wine-patches mailing list