[Slim-Checkins] r11825 - /branches/6.5/server/Slim/Utils/MySQLHelper.pm

adrian at svn.slimdevices.com adrian at svn.slimdevices.com
Wed Apr 25 15:17:43 PDT 2007


Author: adrian
Date: Wed Apr 25 15:17:42 2007
New Revision: 11825

URL: http://svn.slimdevices.com?rev=11825&view=rev
Log:
Bug: N/A
Description: only try to shut down a service if it is running
(silences a warning on Vista)

Modified:
    branches/6.5/server/Slim/Utils/MySQLHelper.pm

Modified: branches/6.5/server/Slim/Utils/MySQLHelper.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Utils/MySQLHelper.pm?rev=11825&r1=11824&r2=11825&view=diff
==============================================================================
--- branches/6.5/server/Slim/Utils/MySQLHelper.pm (original)
+++ branches/6.5/server/Slim/Utils/MySQLHelper.pm Wed Apr 25 15:17:42 2007
@@ -312,10 +312,10 @@
 	if ($OS eq 'win') {
 
 		my %status = ();
-
+		
 		Win32::Service::GetStatus('', $serviceName, \%status);
 
-       		if (scalar keys %status != 0) {
+		if (scalar keys %status != 0 && ($status{'CurrentState'} == 0x02 || $status{'CurrentState'} == 0x04)) {
 
 			$::d_mysql && msg("Running service shutdown.\n");
 
@@ -323,7 +323,7 @@
 
 				return;
 			}
-
+			
 			errorMsg("Running service shutdown failed!\n");
 		}
 	}



More information about the checkins mailing list