ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/ConnectionHandler.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/ConnectionHandler.java (file contents):
Revision 1.8 by ajm, Wed Jan 24 00:56:21 2001 UTC vs.
Revision 1.9 by tdb, Wed Jan 24 01:12:30 2001 UTC

# Line 32 | Line 32 | public class ConnectionHandler extends Thread {
32       * The hardcoded protocol version that we are using.
33       * Used when handshaking with the server
34       */
35 <    public final double PROTOCOL_VERSION = "1.0";
35 >    public final double PROTOCOL_VERSION = 1.0;
36  
37      /**
38       * Thread action DONOTHING.
# Line 140 | Line 140 | public class ConnectionHandler extends Thread {
140                              SwingClient.setControlStatus("Connection Established - " + _server);
141                              String response;
142                              response = _inBound.readLine();
143 <                            if (!Double.parseDouble(response.substring(10, response.length)) > PROTOCOL_VERSION)) {
143 >                            if (!(Double.parseDouble(response.substring(10, response.length())) > PROTOCOL_VERSION)) {
144                                  SwingClient.addMessage("WARNING: server is using a newer protocol (" + response + "), please update your client, continuing with old protocol (PROTOCOL " + PROTOCOL_VERSION + ")" );
145 <                            } else if (!Double.parseDouble(response.substring(10, response.length)) < PROTOCOL_VERSION))
145 >                            } else if (!(Double.parseDouble(response.substring(10, response.length())) < PROTOCOL_VERSION)) {
146                                  throw new IOException("invalid protocol version");
147                              }
148                              SwingClient.addMessage("Handshake Success");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines