vtcp: make vtcp_sa_to_ascii error output more helpful

- write to stderr
- output errno for EAI_SYSTEM
parent 889b9e0b
......@@ -73,7 +73,9 @@ vtcp_sa_to_ascii(const void *sa, socklen_t l, char *abuf, unsigned alen,
* XXX this printf is shitty, but we may not have space
* for the gai_strerror in the bufffer :-(
*/
printf("getnameinfo = %d %s\n", i, gai_strerror(i));
fprintf(stderr, "getnameinfo = %d %s\n", i, gai_strerror(i));
if (i == EAI_SYSTEM)
fprintf(stderr, "errno = %d %s\n", errno, vstrerror(errno));
if (abuf != NULL)
(void)snprintf(abuf, alen, "Conversion");
if (pbuf != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment