# # # patch "ChangeLog" # from [612825c24c1fbe160b476028492d4dbc1412331a] # to [8ffba0bc8729cbc23e8d9ed687fe6d970b403c0b] # # patch "netxx/resolve_gethostbyname.cxx" # from [dcbcbaf6733936797b1edfdd9d27008103763e27] # to [5c298f5747a7925d6d78277e143108297a572e12] # # patch "netxx/sockopt.cxx" # from [c1aeaeb2defba81c103fbde102894373b9bc55de] # to [cf66e1cff4cbff007d4f1390c13da26983678cca] # ============================================================ --- ChangeLog 612825c24c1fbe160b476028492d4dbc1412331a +++ ChangeLog 8ffba0bc8729cbc23e8d9ed687fe6d970b403c0b @@ -1,3 +1,8 @@ +2006-05-27 Matthew Gregan + + * netxx/{resolve_gethostbyname,sockopt}.cxx: A couple more error + reporting cleanups. + 2006-05-27 Derek Scherger * paths.cc (find_and_go_to_workspace): ensure that the current @@ -5,7 +10,7 @@ the search if it's not * tests/t_invalid_root.at: new test * testsuite.at: call it - + 2006-05-27 Derek Scherger * tests/t_invalid_root.at: ============================================================ --- netxx/resolve_gethostbyname.cxx dcbcbaf6733936797b1edfdd9d27008103763e27 +++ netxx/resolve_gethostbyname.cxx 5c298f5747a7925d6d78277e143108297a572e12 @@ -81,9 +81,11 @@ if ( (he = gethostbyname(hostname)) == 0) { std::string error("name resolution failure for "); error += hostname; // HACK: Winsock uses a totally different error reporting mechanism. -#ifndef WIN32 +#ifdef WIN32 + error += ": "; error += str_error(get_last_error()); +#else error += ": "; error += hstrerror(h_errno); -#endif // WIN32 +#endif throw NetworkException(error); } ============================================================ --- netxx/sockopt.cxx c1aeaeb2defba81c103fbde102894373b9bc55de +++ netxx/sockopt.cxx cf66e1cff4cbff007d4f1390c13da26983678cca @@ -128,7 +128,7 @@ os_socklen_type so_len(sizeof(so_error)); if ( (so_return = getsockopt(socket_, SOL_SOCKET, SO_ERROR, val, &so_len)) < 0) { - message = str_error(so_return); + message = str_error(get_last_error()); return false; }