Do not fail silently if IP in connection window is invalid
Follow up #1938 by @softins
If an invalid IP is entered, the connection window closes after clicking on connect and Jamulus does not give an error message.
Proposed behaviour:
- Check IP/Domain on entry and give a red warning "The IP you entered is invalid. Make sure you enter it in a correct format"
- Same as above, but after clicking on connect as error message
It's really a bug, so I'll flag for next release in hope.
#1938 is rather long. Was there any particular comment?
By "Invalid", does this mean "Syntactically incorrect", rather than "Cannot connect to a Jamulus server at that address"?
If it's the former, it should be before closing the Connect dialog. If it's the latter, the existing warning banner should suffice.
@pljones I think invalid as in syntactically incorrect (so 192.168.o.10, and hopefully also a DNS address that doesn't resolve) as the message is "Make sure you enter it in a correct format". Should probably be "The address you entered is invalid..." I think.
Yes. (Ugh, took a while to read your message correctly...)
It's got to cope with non-IP addresses, of course. "I0.10.123.I0" is a perfectly valid address syntactically (it probably doesn't resolve, so you won't connect to anything).
The easiest check is to do just that - attempt to resolve the input text to an IP address (with optional port).
If it fails, you error: "The address entered is not valid. Make sure you typed it correctly."
If it works, you exit the Connect dialog and proceed to attempting to communicate with the provided network address.
De-Tagged. I think it’s a thing for the backlog
I'm going to put this on the 3.11.0 backlog as it shouldn't be too hard.
Probably we can check with a regular expression. I still believe the problem lies deeper: what if we enter an which doesn't have a Jamulus server running? But maybe that's already handled correctly with a timeout.