Summary: Windows network error reporting buggy
Submitted by: cazfi
Submitted on: Tue 14 Jun 2011 02:34:30 AM EEST
Severity: 3 - Normal
Priority: 5 - Normal
Assigned to: None
Discussion Lock: Any
Operating System: None
Planned Release: 2.2.6, 2.3.0, 2.4.0
Windows has no 'errno'. Freeciv has two, not one, way to be compatible with
that. As you can guess, these two methods are just rendering each other
1) When there is network related error, set_socket_errno() is called to set
'errno' introduced by freeciv itself to sensible value. Idea is that later
'errno' can be used without caring if it's this freeciv's own or system
2) Instead of accessing 'errno' directly, fc_get_errno() function is used to
get error value. In most systems it returns just 'errno', but in Windows
result from GetLastError().
What happens with network error case is that method 1 sets 'errno', but that
'errno' is not used when error information is logged. Instead new error value
is fetched with method 2.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list