options: Fix setting the port.

Make sure we correctly read the port from the config file.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
connect: Check that errno is 0 to fix Windows build.

Thanks to Viktor Butskih.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>