aboutsummaryrefslogtreecommitdiff
path: root/src/ProxyMaster.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProxyMaster.java')
-rw-r--r--src/ProxyMaster.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/ProxyMaster.java b/src/ProxyMaster.java
index f80fa11..f8585fd 100644
--- a/src/ProxyMaster.java
+++ b/src/ProxyMaster.java
@@ -7,6 +7,8 @@
* (c) ENAC
*
* changelog:
+ * 1.2.13
+ * - adds support for RESyntaxException
* 1.2.12
*/
package fr.dgac.ivy.tools ; // TODO go into sub tools, and build a shell/.BAT script
@@ -86,8 +88,19 @@ public class ProxyMaster {
PrintWriter out;
String hostname=null; // I will know from the socket
String busDomain=null; // I will know it from the Hello message
+ RE helloRE, getId,fwdPuppet,fwdGhost;
SubReader(Socket socket) throws IOException {
+ try {
+ helloRE=new RE("^Hello bus=(.*)");
+ getId=new RE("^GetID id=(.*)");
+ fwdPuppet=new RE("^ForwardPuppet id=(.*) buffer=(.*)");
+ fwdGhost=new RE("^ForwardGhost id=(.*) buffer=(.*)");
+ } catch ( RESyntaxException res ) {
+ res.printStackTrace();
+ System.out.println("Regular Expression bug in Ivy source code ... bailing out");
+ System.exit(0);
+ }
proxyClients.addElement(this);
hostname = socket.getInetAddress().getHostName();
in=new BufferedReader(new InputStreamReader(socket.getInputStream()));
@@ -119,10 +132,7 @@ public class ProxyMaster {
proxyClients.removeElement(this);
}
- RE helloRE=new RE("^Hello bus=(.*)");
- RE getId=new RE("^GetID id=(.*)");
- RE fwdPuppet=new RE("^ForwardPuppet id=(.*) buffer=(.*)");
- RE fwdGhost=new RE("^ForwardGhost id=(.*) buffer=(.*)");
+
void parseMsg(String msg) {
// System.out.println("PM parsing "+msg);