if no errorbuffer string was provided when a return code was returned, use
authorDaniel Stenberg <daniel@haxx.se>
Mon, 24 May 2004 13:27:48 +0000 (13:27 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 May 2004 13:27:48 +0000 (13:27 +0000)
the curl_easy_strerror() function to provide one

src/main.c

index 9c91520..6346112 100644 (file)
@@ -3461,7 +3461,8 @@ operate(struct Configurable *config, int argc, char *argv[])
                     CURL_CA_CERT_ERRORMSG2 );
           }
           else
-            fprintf(config->errors, "curl: (%d) %s\n", res, errorbuffer);
+            fprintf(config->errors, "curl: (%d) %s\n", res,
+                    errorbuffer[0]? errorbuffer: curl_easy_strerror(res));
         }
 #endif