diff cli-runopts.c @ 105:68b84c20ca1e

Fix for "-l" scp option
author Matt Johnston <matt@ucc.asn.au>
date Tue, 24 Aug 2004 05:05:48 +0000
parents c85c88500ea6
children 6b306ad5f5b5
line wrap: on
line diff
--- a/cli-runopts.c	Tue Aug 24 04:12:08 2004 +0000
+++ b/cli-runopts.c	Tue Aug 24 05:05:48 2004 +0000
@@ -143,12 +143,6 @@
 		if (argv[i][0] == '-') {
 			/* A flag *waves* */
 
-			if (strlen(argv[i]) > 2) {
-					fprintf(stderr, 
-						"WARNING: Ignoring unknown argument '%s'\n", argv[i]);
-					continue;
-			}
-
 			switch (argv[i][1]) {
 				case 'p': /* remoteport */
 					next = &cli_opts.remoteport;
@@ -205,6 +199,12 @@
 						"WARNING: Ignoring unknown argument '%s'\n", argv[i]);
 					break;
 			} /* Switch */
+			
+			/* Now we handle args where they might be "-luser" (no spaces)*/
+			if (next && strlen(argv[i]) > 2) {
+				*next = &argv[i][2];
+				next = NULL;
+			}
 
 			continue; /* next argument */