[jcifs] [PATCH] Fix SmbComReadAndX.toString()

David D. Kilzer ddkilzer at kilzer.net
Fri Jul 16 02:37:13 GMT 2004

Trivial patch to fix SmbComReadAndX.toString() when outputting the
offset.  Found while I was hacking up JCIFS for jTDS integration. :)

I think I'm close...I've got everything matching in the Write AndX
Request packets, and now I'm on to Read AndX Request.  The disturbing
part is that I'm now getting an error message I got yesterday, before I
started hacking up JCIFS.  It looks like setting maxCount/minCount on
the Read AndX Request packet to 1 made SQL Server 6.5 limit its response
to 1 byte, even though it may have had more.  I got this error message
(then and now):

jcifs.smb.SmbException: A device attached to the system is not functioning.

More later tonight (or tomorrow).

-------------- next part --------------
diff -ur jcifs-0.9.5-orig/src/jcifs/smb/SmbComReadAndX.java jcifs-0.9.5/src/jcifs/smb/SmbComReadAndX.java
--- jcifs-0.9.5-orig/src/jcifs/smb/SmbComReadAndX.java	2004-07-01 19:11:48.000000000 -0500
+++ jcifs-0.9.5/src/jcifs/smb/SmbComReadAndX.java	2004-07-15 21:26:24.637536800 -0500
@@ -97,7 +97,7 @@
             ",minCount=" + minCount +
             ",openTimeout=" + openTimeout +
             ",remaining=" + remaining +
-            ",offset=" + maxCount +
+            ",offset=" + offset +
              "]" );

More information about the jcifs mailing list