On Wed, Apr 4, 2012 at 8:42 AM, Peter Hatina <[email protected]> wrote:
> The function int portToInt(const std::string &port) returns the values
> from [-1 to 65535], so you would never error out. -1 was meant to be as
> indicator of invalid transport layer port. If both ports are invalid, I
> do not want to launch any process, that will do nothing. So the
> restriction policy, as far as I am concerned, should be like this.

But if -1 is a valid value to parse to indicate that the port
shouldn't be used, you shouldn't say it's an error, like it does with
this patch.

The portToInt() should return another value, like -2, or better use an
exception?

regards


-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to