# HG changeset patch # User Matt Johnston # Date 1424441633 -28800 # Node ID 64c0aa01e2b66d856055ff04423f9200ed2843da # Parent 1fff5d7163f6574be0c823799f2af8182223f077 Update priority once the socket is open diff -r 1fff5d7163f6 -r 64c0aa01e2b6 cli-session.c --- a/cli-session.c Thu Feb 19 22:42:30 2015 +0800 +++ b/cli-session.c Fri Feb 20 22:13:53 2015 +0800 @@ -100,6 +100,7 @@ dropbear_exit("Connect failed: %s", errstring); } ses.sock_in = ses.sock_out = sock; + update_channel_prio(); } void cli_session(int sock_in, int sock_out, struct dropbear_progress_connection *progress) { diff -r 1fff5d7163f6 -r 64c0aa01e2b6 common-session.c --- a/common-session.c Thu Feb 19 22:42:30 2015 +0800 +++ b/common-session.c Fri Feb 20 22:13:53 2015 +0800 @@ -552,6 +552,11 @@ TRACE(("update_channel_prio")) + if (ses.sock_out < 0) { + TRACE(("leave update_channel_prio: no socket")) + return; + } + new_prio = DROPBEAR_PRIO_BULK; for (i = 0; i < ses.chansize; i++) { struct Channel *channel = ses.channels[i];