Skip to content

Commit

Permalink
* resolv/res_send.c (Aerror): Fix printing IP address.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Aug 22, 2005
1 parent 9fc42df commit e2a99d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
2005-08-21 Ulrich Drepper <drepper@redhat.com>

* resolv/res_send.c (Aerror): Fix printing IP address.

* resolv/res_send.c (send_vc): Pass correct sockaddr size to connect.

2005-08-19 H.J. Lu <hongjiu.lu@intel.com>
Expand Down
9 changes: 7 additions & 2 deletions resolv/res_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,13 @@ Aerror(const res_state statp, FILE *file, const char *string, int error,

fprintf(file, "res_send: %s ([%s].%u): %s\n",
string,
inet_ntop(address->sa_family, address->sa_data,
tmp, sizeof tmp),
(address->sa_family == AF_INET
? inet_ntop(address->sa_family,
&((const struct sockaddr_in *) address)->sin_addr,
tmp, sizeof tmp)
: inet_ntop(address->sa_family,
&((const struct sockaddr_in6 *) address)->sin6_addr,
tmp, sizeof tmp)),
(address->sa_family == AF_INET
? ntohs(((struct sockaddr_in *) address)->sin_port)
: address->sa_family == AF_INET6
Expand Down

0 comments on commit e2a99d8

Please sign in to comment.