summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-04-04 03:47:48 -0300
committerdequis <dx@dxzone.com.ar>2016-04-07 07:26:19 -0300
commit2ba4b9d26afb87c2e661b1c07313ca78b3c5618e (patch)
tree40ef4d979860ae96b0b8ce9ae907c1254410fd50 /src
parent1349755bb57a5f1f3a101b3382b550da50854957 (diff)
downloadirssi-2ba4b9d26afb87c2e661b1c07313ca78b3c5618e.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/core/network.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 76659f3e..3e1b7c70 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -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