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

Comparing projects/cms/source/server/uk/org/iscream/cms/server/filtermanager/HostInit.java (file contents):
Revision 1.17 by tdb, Sun Feb 25 23:19:20 2001 UTC vs.
Revision 1.18 by tdb, Wed Feb 28 10:27:54 2001 UTC

# Line 6 | Line 6 | import uk.ac.ukc.iscream.core.*;
6   import uk.ac.ukc.iscream.filter.*;
7   import uk.ac.ukc.iscream.util.*;
8   import uk.ac.ukc.iscream.componentmanager.*;
9 < import java.net.Socket;
9 > import java.net.*;
10   import java.io.*;
11  
12   /**
# Line 87 | Line 87 | class HostInit extends Thread {
87                          // send info
88                          _socketOut.println(myConfig.getFileList());
89                  }
90 <
90 >                
91 >                // send the FQDN to the host
92 >                inBound = _socketIn.readLine();
93 >                if(!inBound.equals("FQDN")) {
94 >                        // protocol error
95 >                    _socketOut.println("ERROR");
96 >                    throw new IOException("protocol error - expected:FQDN got:" + inBound);
97 >                }
98 >                else {
99 >                    try {
100 >                        // try to send the fqdn to the host
101 >                            _socketOut.println(InetAddress.getLocalHost().getHostName());
102 >                        }
103 >                        catch(UnknownHostException e) {
104 >                            // we failed for some reason
105 >                            _socketOut.println("ERROR");
106 >                        }
107 >                }
108 >                
109                  // get properties
110                  inBound = _socketIn.readLine();
111                  while(!inBound.equals("ENDCONFIG")) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines