diff options
author | Matt Johnston <matt@ucc.asn.au> | 2014-07-16 22:53:32 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2014-07-16 22:53:32 +0800 |
commit | da57dd13c5352efd63c8692bbc12d19c9f882a2b (patch) | |
tree | ec18c7626bb47b3c4540f78d65d2a49b8a2d2fbf /svr-chansession.c | |
parent | f1826ea389bfddb6a0d52314d01e3d8b8f46eec8 (diff) |
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.
Diffstat (limited to 'svr-chansession.c')
-rw-r--r-- | svr-chansession.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index 63e56a8..4b45294 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -253,6 +253,8 @@ static int newchansess(struct Channel *channel) { chansess->agentdir = NULL; #endif + channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE; + return 0; } @@ -668,8 +670,11 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, 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); |