Menu

#74 Still Problems accessing Socket SDIO 3E/M Scanners on PPC

open
nobody
None
5
2007-07-12
2007-07-12
No

Similar to the already fixed bug #1719224, there is still another typo in the method isDriverLoaded():

To set the internal variable scannerIsPassive correctly, the ScanManagerVersion should be compared to the String "SocketScan" and not "SocketCom":
scannerIsPassive = "SocketCom".equals(getScanManagerVersion());

However, the setting of the variable will still not work correctly, as the method isDriverLoaded() normally is called by the method activate() and the method getScanManagerVersion() checks the internal variable isActive, which will be set after the call to isDriverLoaded in the method activate(). Hence, the scannerIsPassive will be false all the time.

My proposition would be to set the variable scannerIsPassive in the method activate(), something like this:

public static boolean activate()
{
isActive = isDriverLoaded() && NativeMethods4JDK.scannerActivate();
scannerIsPassive = "SocketScan".equals(getScanManagerVersion());

return isActive;
}

I hope I described this understandable.

Andreas

Discussion


Log in to post a comment.

Auth0 Logo