From 4ab0c9405722779bad5f12148d088a9ecce5b34d Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:51:24 +0000 Subject: Utilisateur : Fcolin Date : 30/07/03 Heure : 10:01 Archivé dans $/EScribe/Ivy Commentaire: diff bug on mono on Int32.Parse (vss 4) --- CSharp/Ivy/Ivy/IvyWatcher.cs | 5 +++-- 1 file 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) -- cgit v1.1