From e7a04ebff46611fd84b65bac89ef2ad579cb3461 Mon Sep 17 00:00:00 2001 From: Gary Spencer Date: Thu, 19 Jan 2006 15:36:08 +0000 Subject: [PATCH] Allow CIFS server to be disabled by removing the configuration section from file-servers.xml. Fixed check for disabling FTP server if config section is not available. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2149 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../filesys/server/config/ServerConfiguration.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java b/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java index ac0687da5e..dc0046cdc8 100644 --- a/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java +++ b/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java @@ -507,6 +507,14 @@ public class ServerConfiguration */ private final void processCIFSServerConfig(Config config) { + // If the configuration section is not valid then CIFS is disabled + + if ( config == null || config.getConfigElements().isEmpty()) + { + setSMBServerEnabled(false); + return; + } + // Get the network broadcast address // // Note: We need to set this first as the call to getLocalDomainName() may use a NetBIOS @@ -1072,7 +1080,7 @@ public class ServerConfiguration { // If the configuration section is not valid then FTP is disabled - if ( config == null) + if ( config == null || config.getConfigElements().isEmpty()) { setFTPServerEnabled(false); return;