[jcifs] SmbException errorClass, errorCode error in SmbFile.java

Gary Rambo c-grambo at aventail.com
Fri Oct 24 06:28:43 EST 2003


An SmbException "unknown file" thrown at line 883 of SmbFile.java 
(jcifs-0.7.14, 15) combines the errorClass and errorCode values into a 
single argument instead of sending them as separate arguments:

Caused by: jcifs.smb.SmbException: Unknown host: INTERNAL
        at jcifs.smb.SmbFile.getType(SmbFile.java:883)

lines 882ff SmbFile.java
} catch( UnknownHostException uhe ) {
	throw new SmbException( SmbException.ERRCLI |
				SmbException.ERRunknownHost,
				"Unknown host: " + uhe.getMessage() );
				}

resulting errorClass is 172, errorCode 0; but the expected values 
for ERRCLI and ERRunknownHost are 0x20 and 5004.

The code, following other UnknownHost cases, should be 

} catch( UnknownHostException uhe ) {
	throw new SmbException( SmbException.ERRCLI,
				SmbException.ERRunknownHost,
				"Unknown host: " + uhe.getMessage() );

Thanks.

Gary








More information about the jcifs mailing list