diff options
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r-- | CSharp/Ivy/Ivy/IvyWatcher.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CSharp/Ivy/Ivy/IvyWatcher.cs b/CSharp/Ivy/Ivy/IvyWatcher.cs index 305e749..1815a04 100644 --- a/CSharp/Ivy/Ivy/IvyWatcher.cs +++ b/CSharp/Ivy/Ivy/IvyWatcher.cs @@ -97,12 +97,13 @@ namespace IvyBus IPAddress remotehost = remoteEP.Address;
traceDebug("BUSWATCHER Receive Broadcast from " + Dns.GetHostName() + ":" + remoteEP.Port);
// TODO if ( !isInDomain( remotehost ) ) continue;
- String[] st = msg.Split(' ');
- if (st.Length != 2)
+ String[] st = msg.Split(new char[]{' ','\n'},3);
+ if (st.Length != 3)
{
Console.Error.WriteLine("Bad format " + msg);
continue;
}
+
int version = Int32.Parse(st[0]);
port = Int32.Parse(st[1]);
if (version != Ivy.PROCOCOLVERSION)
|