commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. inetutils-1_7-31-g90ba056


From: Alfred M. Szmidt
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_7-31-g90ba056
Date: Thu, 04 Feb 2010 13:24:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  90ba0564bb742bca412e9be6f799647aabddfb17 (commit)
      from  700065918b9a33d08ceffbfe296a2d6220a70209 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=90ba0564bb742bca412e9be6f799647aabddfb17


commit 90ba0564bb742bca412e9be6f799647aabddfb17
Author: Alfred M. Szmidt <address@hidden>
Date:   Thu Feb 4 14:30:15 2010 +0100

    New options --active and --passive.

diff --git a/ChangeLog b/ChangeLog
index 3883212..f5b45b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-04  Alfred M. Szmidt  <address@hidden>
+
+       New options --active and --passive.
+
+       * ftp/main.c (OPT_PROMPT): New enum.
+       (argp_options) <prompt>: Removed short option (-p).  <active>: New
+       option; uses -A as short option.  <passive>: New option; uses -p
+       as short option.
+       (parse_opt): Handle --active and --passive, updated --prompt
+       accordingly.
+       (main) <passivemode>: Set initial value before argument parsing.
+
 2010-01-29  Alfred M. Szmidt  <address@hidden>
 
        * ping/Makefile.am (install-ping-hook): Clarify warning message
diff --git a/NEWS b/NEWS
index 7c7598a..55f55c0 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,14 @@ Version 1.7.90:
 
 * inetutils
 
+** ftp
+
+New options --active and --passive to enable/disable active transfer
+mode. The short option for --prompt has been removed, and is instead
+now used to enable passive transfer mode.
+
+** ifconfig
+
 New commands (up and down) to bring up/down an interface using
 ifconfig.
 
diff --git a/ftp/main.c b/ftp/main.c
index ae5d76b..b01bc22 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -92,6 +92,10 @@ static char *prompt = 0;
 const char args_doc[] = "[HOST [PORT]]";
 const char doc[] = "Remote file transfer.";
 
+enum {
+  OPT_PROMPT = CHAR_MAX + 1,
+};
+
 static struct argp_option argp_options[] = {
 #define GRP 0
   {"debug", 'd', NULL, 0, "set the SO_DEBUG option", GRP+1},
@@ -101,7 +105,9 @@ static struct argp_option argp_options[] = {
   {"no-login", 'n', NULL, 0, "do not automatically login to the remote system",
    GRP+1},
   {"trace", 't', NULL, 0, "enable packet tracing", GRP+1},
-  {"prompt", 'p', "PROMPT", OPTION_ARG_OPTIONAL, "print a command line PROMPT "
+  {"passive", 'p', NULL, 0, "enable passive mode transfer", GRP+1},
+  {"active", 'A', NULL, 0, "enable active mode transfer", GRP+1},
+  {"prompt", OPT_PROMPT, "PROMPT", OPTION_ARG_OPTIONAL, "print a command line 
PROMPT "
    "(optionally), even if not on a tty", GRP+1},
   {"verbose", 'v', NULL, 0, "verbose output", GRP+1},
 #undef GRP
@@ -138,10 +144,18 @@ parse_opt (int key, char *arg, struct argp_state *state)
       verbose++;
       break;
 
-    case 'p':          /* Print command line prompt.  */
+    case OPT_PROMPT:           /* Print command line prompt.  */
       prompt = arg ? arg : DEFAULT_PROMPT;
       break;
 
+    case 'p':          /* Enable passive transfer mode.  */
+      passivemode = 1;
+      break;
+
+    case 'A':  /* Enable active transfer mode.  */
+      passivemode = 0;
+      break;
+
     default:
       return ARGP_ERR_UNKNOWN;
     }
@@ -168,6 +182,7 @@ main (int argc, char *argv[])
   doglob = 1;
   interactive = 1;
   autologin = 1;
+  passivemode = 0;             /* passive mode not active */
 
   /* Parse command line */
   iu_argp_init ("ftp", default_program_authors);
@@ -186,7 +201,6 @@ main (int argc, char *argv[])
 
   cpend = 0;                   /* no pending replies */
   proxy = 0;                   /* proxy not active */
-  passivemode = 0;             /* passive mode not active */
   crflag = 1;                  /* strip c.r. on ascii gets */
   sendport = -1;               /* not using ports */
   /*

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog  |   12 ++++++++++++
 NEWS       |    8 ++++++++
 ftp/main.c |   20 +++++++++++++++++---
 3 files changed, 37 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]