]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
resolve: add error message when resolving using SIGALRM
authorAndreas Streichardt <andreas@arangodb.com>
Mon, 10 Oct 2016 11:08:24 +0000 (13:08 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Oct 2016 12:14:20 +0000 (14:14 +0200)
Closes #1066

lib/hostip.c

index f2d984164d4da1d0107da864b559fd41eee02b75..24a922eb29a3b22a835ab5cd1ec5b0a4fa601d44 100644 (file)
@@ -603,11 +603,14 @@ int Curl_resolv_timeout(struct connectdata *conn,
     /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */
     return Curl_resolv(conn, hostname, port, entry);
 
-  if(timeout < 1000)
+  if(timeout < 1000) {
     /* The alarm() function only provides integer second resolution, so if
        we want to wait less than one second we must bail out already now. */
+    failf(data,
+        "remaining timeout of %ld too small to resolve via SIGALRM method",
+        timeout);
     return CURLRESOLV_TIMEDOUT;
-
+  }
   /* This allows us to time-out from the name resolver, as the timeout
      will generate a signal and we will siglongjmp() from that here.
      This technique has problems (see alarmfunc).