From 00c36aab57411acdaa0b2d05a3f6cd55d9d755ef Mon Sep 17 00:00:00 2001 From: Gary Spencer Date: Thu, 6 Apr 2006 09:00:12 +0000 Subject: [PATCH] If Winsock based NetBIOS code is selected on 64bit Windows then switch it back to the older Netbios() API code and output a warning. Remove unused import in X64. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2628 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../filesys/server/config/ServerConfiguration.java | 14 ++++++++++++++ source/java/org/alfresco/filesys/util/X64.java | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java b/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java index f977a12ebf..f7f3aaf65e 100644 --- a/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java +++ b/source/java/org/alfresco/filesys/server/config/ServerConfiguration.java @@ -72,6 +72,7 @@ import org.alfresco.filesys.smb.Dialect; import org.alfresco.filesys.smb.DialectSelector; import org.alfresco.filesys.smb.ServerType; import org.alfresco.filesys.util.IPAddress; +import org.alfresco.filesys.util.X64; import org.alfresco.repo.security.authentication.AuthenticationComponent; import org.alfresco.repo.security.authentication.NTLMMode; import org.alfresco.service.cmr.repository.NodeService; @@ -974,6 +975,19 @@ public class ServerConfiguration implements ApplicationListener setWin32WinsockNetBIOS( useWinsock); } + // Force the older NetBIOS API code to be used on 64Bit Windows + + if ( useWinsockNetBIOS() == true && X64.isWindows64()) + { + // Log a warning + + logger.warn("Using older Netbios() API code"); + + // Use the older NetBIOS API code + + setWin32WinsockNetBIOS( false); + } + // Check if the current operating system is supported by the Win32 // NetBIOS handler diff --git a/source/java/org/alfresco/filesys/util/X64.java b/source/java/org/alfresco/filesys/util/X64.java index 7fb4af9e0b..9247a1d159 100644 --- a/source/java/org/alfresco/filesys/util/X64.java +++ b/source/java/org/alfresco/filesys/util/X64.java @@ -17,8 +17,6 @@ package org.alfresco.filesys.util; -import java.util.Properties; - /** * X64 Class *