s3-svcctl: indicate that the spooler is already running if it does.
authorGünther Deschner <gd@samba.org>
Tue, 21 Apr 2009 14:18:51 +0000 (16:18 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 24 Apr 2009 11:38:43 +0000 (13:38 +0200)
Guenther

source3/services/svc_spoolss.c

index bb2b892c809206f059a12ec48e8934726ee81804..4a2cb7897755a144ec4fd503c52e2499088fc042 100644 (file)
@@ -50,6 +50,10 @@ static WERROR spoolss_start( const char *service )
        if ( _lp_disable_spoolss() )
                return WERR_ACCESS_DENIED;
 
+       if (lp_get_spoolss_state() == SVCCTL_RUNNING) {
+               return WERR_SERVICE_ALREADY_RUNNING;
+       }
+
        lp_set_spoolss_state( SVCCTL_RUNNING );
 
        return WERR_OK;