[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#238196: atftp always exits with exit code 0 when called in batch mode

Package: atftp
Severity: normal
Tags: patch


when called in batch mode, like in the line

  atftp -g -r <filename> <server>

atftp always exits with exit code 0, even if all or part of the
actions fail.  This is annoying because you only really need the exit
code when you call atftp in batch mode.  I've attached a simple patch.


P.S.:  Greetings from Nick.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.3-1-k7
Locale: LANG=C, LC_CTYPE=de_DE@euro

--- tftp.c.old  2003-06-20 04:09:26.000000000 +0200
+++ tftp.c      2004-03-15 22:19:38.000000000 +0100
@@ -927,7 +927,8 @@
           make_arg(string, &ac, &av);
-          process_cmd(ac, av);
+          if (process_cmd(ac, av) == ERR)
+               exit(ERR);
      return OK;

Reply to: