--- projects/cms/source/server/uk/org/iscream/cms/server/filtermanager/HostInit.java 2001/02/25 23:19:20 1.17 +++ projects/cms/source/server/uk/org/iscream/cms/server/filtermanager/HostInit.java 2001/02/28 10:27:54 1.18 @@ -6,7 +6,7 @@ import uk.ac.ukc.iscream.core.*; import uk.ac.ukc.iscream.filter.*; import uk.ac.ukc.iscream.util.*; import uk.ac.ukc.iscream.componentmanager.*; -import java.net.Socket; +import java.net.*; import java.io.*; /** @@ -15,7 +15,7 @@ import java.io.*; * and a reference to a Filter to which it should pass data. * * @author $Author: tdb $ - * @version $Id: HostInit.java,v 1.17 2001/02/25 23:19:20 tdb Exp $ + * @version $Id: HostInit.java,v 1.18 2001/02/28 10:27:54 tdb Exp $ */ class HostInit extends Thread { @@ -24,7 +24,7 @@ class HostInit extends Thread { /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.17 $"; + public final String REVISION = "$Revision: 1.18 $"; //---STATIC METHODS--- @@ -87,7 +87,25 @@ class HostInit extends Thread { // send info _socketOut.println(myConfig.getFileList()); } - + + // send the FQDN to the host + inBound = _socketIn.readLine(); + if(!inBound.equals("FQDN")) { + // protocol error + _socketOut.println("ERROR"); + throw new IOException("protocol error - expected:FQDN got:" + inBound); + } + else { + try { + // try to send the fqdn to the host + _socketOut.println(InetAddress.getLocalHost().getHostName()); + } + catch(UnknownHostException e) { + // we failed for some reason + _socketOut.println("ERROR"); + } + } + // get properties inBound = _socketIn.readLine(); while(!inBound.equals("ENDCONFIG")) {