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.31 by ajm, Fri Mar 23 04:05:26 2001 UTC vs.
Revision 1.32 by ajm, Tue May 1 19:25:14 2001 UTC

# Line 204 | Line 204 | public class ConnectionHandler extends Thread {
204                              
205                              // start firewall if needed
206                              _server = handleFirewall(_configuredServer, port, _controlFirewallProcess);
207 <                            
207 >
208                              Conient.setControlStatus("Connecting to - " + _server);                          
209                              _controlLink = new Socket(_server, port);
210                              _inBound = new BufferedReader(new InputStreamReader(_controlLink.getInputStream()));
# Line 621 | Line 621 | public class ConnectionHandler extends Thread {
621       * @param firewallProcess the holder for the new firewall process
622       * @return the server to connect to, as determined by this routine
623       */
624 <    private String handleFirewall(String server, int port, Process firewallProcess) {
624 >    private String handleFirewall(String server, int port, TunnelProcess firewallProcess) {
625          String firewallCommand = _configuration.getProperty("firewall.command");
626          String useFirewall = _configuration.getProperty("useFirewall");
627          String firewallCommandWait = _configuration.getProperty("firewall.commandwait");
# Line 634 | Line 634 | public class ConnectionHandler extends Thread {
634              Conient.addMessage("WARNING{firewall}: firewall pipes requested, running pipe setup command \"" + firewallCommand + "\"");
635              try {
636                  // run the command
637 <                firewallProcess = Runtime.getRuntime().exec(firewallCommand);
637 >                firewallProcess.setProcess(Runtime.getRuntime().exec(firewallCommand));
638                  
639                  // work out how long we should wait before carrying on                
640                  int time = 0;
# Line 672 | Line 672 | public class ConnectionHandler extends Thread {
672       *
673       * @param firewallProcess the process to check
674       */
675 <    private void closeFirewall(Process firewallProcess) {
676 <        if (firewallProcess != null) {
677 <            firewallProcess.destroy();
678 <            firewallProcess = null;
675 >    private void closeFirewall(TunnelProcess firewallProcess) {
676 >        if (firewallProcess.getProcess() != null) {
677 >            firewallProcess.getProcess().destroy();
678 >            firewallProcess.setProcess(null);
679              Conient.addMessage("WARNING{firewall}: firewall process destroyed");
680          }
681      }
# Line 758 | Line 758 | public class ConnectionHandler extends Thread {
758       * The process used to start the firewall pipe
759       * for the control link.
760       */
761 <    private Process _controlFirewallProcess = null;
761 >    private TunnelProcess _controlFirewallProcess = new TunnelProcess();
762      
763      /**
764       * The process used to start the firewall pipe
765       * for the data link.
766       */
767 <    private Process _dataFirewallProcess = null;
767 >    private TunnelProcess _dataFirewallProcess = new TunnelProcess();
768      
769   //---STATIC ATTRIBUTES---
770  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines