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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/clientinterface/TCPControlHandler.java (file contents):
Revision 1.9 by tdb, Sat Jan 27 23:30:40 2001 UTC vs.
Revision 1.10 by tdb, Mon Jan 29 02:00:03 2001 UTC

# Line 73 | Line 73 | class TCPControlHandler extends Thread {
73              _socketOut.println(PROTOVER);
74              _socketOut.flush();
75              _clientName = _socketIn.readLine();
76 +            if(cmd==null) {
77 +                throw new IOException("Fatal error reading from client");
78 +            }
79              _socketOut.println("OK");
80              _socketOut.flush();
81          }
# Line 87 | Line 90 | class TCPControlHandler extends Thread {
90          while(run) {
91              try {
92                  String cmd = _socketIn.readLine();
93 +                if(cmd==null) {
94 +                    throw new IOException("Fatal error reading from client");
95 +                }
96                  // make a decision about what to do
97                  if(cmd.equals("STARTCONFIG")) {
98                      // get the configuration for this client
# Line 95 | Line 101 | class TCPControlHandler extends Thread {
101                      _socketOut.flush();
102                      // get properties
103                      cmd = _socketIn.readLine();
104 +                    if(cmd==null) {
105 +                        throw new IOException("Fatal error reading from client");
106 +                    }
107                      // provide all the requested properties
108                      while(!cmd.equals("ENDCONFIG")) {
109                          // client is restricted to this properties
# Line 114 | Line 123 | class TCPControlHandler extends Thread {
123                              _socketOut.flush();
124                          }
125                          cmd = _socketIn.readLine();
126 +                        if(cmd==null) {
127 +                            throw new IOException("Fatal error reading from client");
128 +                        }
129                      }
130                      _socketOut.println("OK");
131                      _socketOut.flush();
# Line 175 | Line 187 | class TCPControlHandler extends Thread {
187                          _socketOut.flush();
188                          // read and set the host list
189                          cmd = _socketIn.readLine();
190 +                        if(cmd==null) {
191 +                            throw new IOException("Fatal error reading from client");
192 +                        }
193                          _hostList = cmd;
194                          _socketOut.println("OK");
195                          _socketOut.flush();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines