jcifs-1.2.10 from tgz
authorFelix Schumacher <p0354740@isib001.(none)>
Wed, 6 Aug 2008 14:39:13 +0000 (16:39 +0200)
committerFelix Schumacher <p0354740@isib001.(none)>
Wed, 6 Aug 2008 14:39:13 +0000 (16:39 +0200)
Fri Nov 24 11:58:14 EST 2006
jcifs-1.2.10 released / Minor Adjustments

The 1.2.10 release is now final. A NetBIOS name service lookup bug has
been fixed in addition to severl other harmless adjustments.

README.txt
build.xml
examples/CopyToTest.java [new file with mode: 0644]
src/jcifs/netbios/NameServiceClient.java
src/jcifs/util/transport/Transport.java

index db54b75..305bbca 100644 (file)
@@ -1,3 +1,9 @@
+Fri Nov 24 11:58:14 EST 2006
+jcifs-1.2.10 released / Minor Adjustments
+
+The 1.2.10 release is now final. A NetBIOS name service lookup bug has
+been fixed in addition to severl other harmless adjustments.
+
 Tue Nov 14 12:32:23 EST 2006
 jcifs-1.2.10b released / MSRPC Support, Long Unicode Share Name
   Enumeration and Critical Bugfixes
index 5f3f346..a2e023f 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
 <project name="jcifs" default="usage" basedir=".">
 
-    <property name="version" value="1.2.10b"/>
-    <property name="reldate" value="Nov 14, 2006"/>
+    <property name="version" value="1.2.10"/>
+    <property name="reldate" value="Nov 24, 2006"/>
 
     <target name="usage">
         <echo>
diff --git a/examples/CopyToTest.java b/examples/CopyToTest.java
new file mode 100644 (file)
index 0000000..bf6e5da
--- /dev/null
@@ -0,0 +1,29 @@
+import jcifs.smb.*;
+
+public class CopyToTest extends Thread {
+
+    String url1, url2;
+
+    CopyToTest(String url1, String url2) {
+        this.url1 = url1;
+        this.url2 = url2;
+    }
+
+    public void run() {
+        for (int i = 0; i < 1; i++) {
+            try {
+                SmbFile file = new SmbFile(url1);
+                SmbFile to = new SmbFile(url2);
+                file.copyTo(to);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        CopyToTest cts = new CopyToTest(args[0], args[1]);
+        cts.start();
+        Thread.sleep(50000);
+    }
+}
index dbc72f9..00f4d3a 100644 (file)
@@ -213,6 +213,9 @@ class NameServiceClient implements Runnable {
         Integer nid = null;
         int max = NbtAddress.NBNS.length;
 
+        if (max == 0)
+            max = 1; /* No WINs, try only bcast addr */
+
         synchronized( response ) {
             while (max-- > 0) {
                 try {
index bcc06be..934549b 100644 (file)
@@ -157,8 +157,9 @@ public abstract class Transport implements Runnable {
                     state = 0;
                     throw new TransportException( "Connection in error", te );
                 default:
+                    TransportException te = new TransportException( "Invalid state: " + state );
                     state = 0;
-                    throw new TransportException( "Invalid state: " + state );
+                    throw te;
             }
 
             state = 1;
@@ -213,10 +214,13 @@ public abstract class Transport implements Runnable {
                             break; /* outstanding requests */
                         }
                         doDisconnect( hard );
+                    case 4: /* in error - reset the transport */
+                        thread = null;
+                        state = 0;
+                        break;
                     default:
                         if (log.level >= 1)
                             log.println("Invalid state: " + state);
-                    case 4: /* in error - reset the transport */
                         thread = null;
                         state = 0;
                         break;