diff cli-main.c @ 910:89555751c489 asm

merge up to 2013.63, improve ASM makefile rules a bit
author Matt Johnston <matt@ucc.asn.au>
date Thu, 27 Feb 2014 21:35:58 +0800
parents aa689d140928
children c88dce72f6d2
line wrap: on
line diff
--- a/cli-main.c	Sun Oct 06 22:32:03 2013 +0800
+++ b/cli-main.c	Thu Feb 27 21:35:58 2014 +0800
@@ -28,6 +28,8 @@
 #include "dbutil.h"
 #include "runopts.h"
 #include "session.h"
+#include "dbrandom.h"
+#include "crypto_desc.h"
 
 static void cli_dropbear_exit(int exitcode, const char* format, va_list param) ATTRIB_NORETURN;
 static void cli_dropbear_log(int priority, const char* format, va_list param);
@@ -51,6 +53,9 @@
 
 	disallow_core();
 
+	seedrandom();
+	crypto_init();
+
 	cli_getopts(argc, argv);
 
 	TRACE(("user='%s' host='%s' port='%s'", cli_opts.username,
@@ -70,6 +75,9 @@
 		int sock = connect_remote(cli_opts.remotehost, cli_opts.remoteport, 
 				0, &error);
 		sock_in = sock_out = sock;
+	 	if (cli_opts.wantpty) {
+			set_sock_priority(sock, DROPBEAR_PRIO_LOWDELAY);
+	 	}
 	}
 
 	if (sock_in < 0) {
@@ -138,4 +146,4 @@
 		*sock_in = *sock_out = -1;
 	}
 }
-#endif // ENABLE_CLI_PROXYCMD
+#endif /* ENABLE_CLI_PROXYCMD */