diff svr-chansession.c @ 941:5daedffd0769

Set tcp priority as follows: if (connecting || ptys || x11) tos = LOWDELAY; else if (tcp_forwards) tos = 0; else tos = BULK; TCP forwards could be either lowdelay or bulk, hence the default priority.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 16 Jul 2014 22:53:32 +0800
parents 860e3522f8fc
children 36eacc322e00
line wrap: on
line diff
--- a/svr-chansession.c	Wed Jul 09 22:02:22 2014 +0800
+++ b/svr-chansession.c	Wed Jul 16 22:53:32 2014 +0800
@@ -253,6 +253,8 @@
 	chansess->agentdir = NULL;
 #endif
 
+	channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE;
+
 	return 0;
 
 }
@@ -668,8 +670,11 @@
 
 	if (chansess->term == NULL) {
 		/* no pty */
-		set_sock_priority(ses.sock_out, DROPBEAR_PRIO_BULK);
 		ret = noptycommand(channel, chansess);
+		if (ret == DROPBEAR_SUCCESS) {
+			channel->prio = DROPBEAR_CHANNEL_PRIO_BULK;
+			update_channel_prio();
+		}
 	} else {
 		/* want pty */
 		ret = ptycommand(channel, chansess);