]> sjero.net Git - wget/commitdiff
Set exit status when invalid host given
authorDaniel Manrique <roadmr@tomechangosubanana.com>
Sat, 23 Apr 2011 19:31:41 +0000 (15:31 -0400)
committerDaniel Manrique <roadmr@tomechangosubanana.com>
Sat, 23 Apr 2011 19:31:41 +0000 (15:31 -0400)
src/ChangeLog
src/html-url.c
src/main.c

index 0a16c79fdaa95a751dfba0bd0710a4d38f2d19db..8b74216d666a3a8508876a48e897e463b0db6ae1 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-21  Daniel Manrique <roadmr@tomechangosubanana.com>
+       * main.c (main): Set exit status when invalid host name given in
+       command line.
+       * html-url.c (get_urls_file): Set exit status when invalid host
+       name given in input file.
+
 2011-04-19  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * gnutls.c: Do not include <fcntl.h>.
index 287b2f548414fbbcb6e8fa1d62040ec43910e80e..c7c3e39ab55929e2f23028ddc25046575c468515 100644 (file)
@@ -810,6 +810,7 @@ get_urls_file (const char *file)
                      file, url_text, error);
           xfree (url_text);
           xfree (error);
+          inform_exit_status (URLERROR);
           continue;
         }
       xfree (url_text);
index 80ecc3dddf583dd370e8acead3c902eaf81ae920..3a0525034aa09937b6b4f585ab0a2ee1f7b61c30 100644 (file)
@@ -1347,6 +1347,7 @@ outputting to a regular file.\n"));
           char *error = url_error (*t, url_err);
           logprintf (LOG_NOTQUIET, "%s: %s.\n",*t, error);
           xfree (error);
+          inform_exit_status (URLERROR);
         }
       else
         {
@@ -1387,7 +1388,9 @@ outputting to a regular file.\n"));
   if (opt.input_filename)
     {
       int count;
-      retrieve_from_file (opt.input_filename, opt.force_html, &count);
+      int status;
+      status = retrieve_from_file (opt.input_filename, opt.force_html, &count);
+      inform_exit_status (status);
       if (!count)
         logprintf (LOG_NOTQUIET, _("No URLs found in %s.\n"),
                    opt.input_filename);