diff options
-rwxr-xr-x | src/Ivy.java | 2 | ||||
-rwxr-xr-x | src/IvyWatcher.java | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Ivy.java b/src/Ivy.java index 4101931..c548a40 100755 --- a/src/Ivy.java +++ b/src/Ivy.java @@ -263,6 +263,7 @@ public class Ivy implements Runnable { traceDebug("lib: "+libVersion+" protocol: "+PROTOCOLVERSION+" TCP service open on port "+applicationPort); Domain[] d = parseDomains(domainbus); + if (d.length==0) throw new IvyException("no domain found in "+domainbus); watcherId=getWBUId().replace(' ','*'); // no space in the watcherId // readies the rendezvous : an IvyWatcher (thread) per domain bus for (int index=0;index<d.length;index++) @@ -283,6 +284,7 @@ public class Ivy implements Runnable { d[index++]=new Domain(IvyWatcher.getDomain(s),IvyWatcher.getPort(s)); } catch (IvyException ie) { // do nothing + ie.printStackTrace(); } } // fixes the port values ... diff --git a/src/IvyWatcher.java b/src/IvyWatcher.java index 4b06b1b..52edb4b 100755 --- a/src/IvyWatcher.java +++ b/src/IvyWatcher.java @@ -320,7 +320,8 @@ class IvyWatcher implements Runnable { RE numbersPoint = new RE("([0-9]|\\.)+"); if (!numbersPoint.match(net)) { // traceDebug("should only have numbers and point ? I won't add anything... " + net); - return net; + return "127.255.255.255"; + // return net; } net += ".255.255.255"; RE exp = new RE( "^(\\d+\\.\\d+\\.\\d+\\.\\d+).*"); @@ -333,7 +334,7 @@ class IvyWatcher implements Runnable { System.out.println(e); System.exit(0); } - // System.out.println("debug: returning net=[" + net+ "]"); + //System.out.println("next domain: "+net); return net; } @@ -341,6 +342,7 @@ class IvyWatcher implements Runnable { int sep_index = net.lastIndexOf( ":" ); int port= ( sep_index == -1 ) ? 0 :Integer.parseInt( net.substring( sep_index +1 )); // System.out.println("net: ["+net+"]\nsep_index: "+sep_index+"\nport: "+port); + //System.out.println("next port: "+port); return port; } |