1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

net_gethosterror: Handle EAI_SYSTEM ("System error") properly

That error code means "check errno". A few users got it and we never
figured out what happened - it usually fixed itself after restarting
something - so hopefully with this we'll have more information the next
time.
This commit is contained in:
dequis 2016-04-04 03:47:48 -03:00
parent 1349755bb5
commit 2ba4b9d26a

View File

@ -510,7 +510,11 @@ const char *net_gethosterror(int error)
{
g_return_val_if_fail(error != 0, NULL);
return gai_strerror(error);
if (error == EAI_SYSTEM) {
return strerror(errno);
} else {
return gai_strerror(error);
}
}
/* return TRUE if host lookup failed because it didn't exist (ie. not