stcn52 / flowlib

Automatically exported from code.google.com/p/flowlib
0 stars 0 forks source link

Invalid Protocol Version #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What step will reproduce the problem?
Connecting to any ADC hub.

What is the expected output? 
Successfully connect to the ADC hub.

What do you see instead?
"Protocol is not supported. I only support ADC 1.0/ADCS 0.10 and prior"
shown as main chat message.

What version of the product are you using?
FlowLib (20080628)

Please provide any additional information below.
In file AdcProtocol.cs...

At line 752:

version = double.Parse(ctm.Protocol.Substring( ctm.Protocol.IndexOf("/") +1
).Replace(".", ","));

At line 805:

version = double.Parse(rcm.Protocol.Substring( rcm.Protocol.IndexOf("/") +1
).Replace(".", ","));

The Replace methods should be removed to successfully return the correct
protocol version.

Original issue reported on code.google.com by fadil.kh...@gmail.com on 7 Dec 2008 at 2:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Of course!
Number parsing is culture dependent.
Thanks for finding it! :)

The below code should fix this.
Can you verify this?

version = double.Parse(ctm.Protocol.Substring( ctm.Protocol.IndexOf("/") +1
), CultureInfo.GetCultureInfo("en-GB").NumberFormat));

Original comment by blomman84 on 7 Dec 2008 at 7:12

GoogleCodeExporter commented 9 years ago
Fix is in SVN

Original comment by blomman84 on 9 Dec 2008 at 5:54

GoogleCodeExporter commented 9 years ago
It works great :)
Thanks.

Original comment by fadil.kh...@gmail.com on 9 Dec 2008 at 8:55