URL:
  <http://gna.org/bugs/?18210>

                 Summary: Windows network error reporting buggy
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Tue 14 Jun 2011 02:34:30 AM EEST
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.2.6, 2.3.0, 2.4.0

    _______________________________________________________

Details:

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
non-working.

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
'errno'.

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:

  <http://gna.org/bugs/?18210>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to