summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-02-20 22:13:53 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-02-20 22:13:53 +0800
commitdef06d6af9403251e6f4cd1ee3700b8906d42ed5 (patch)
treed0deabd431ae098f6cea1aa6fa4f696248918670
parentbd726f3b6b32b4d60153d8b21bccd1a0b0ab52f9 (diff)
downloaddropbear-def06d6af9403251e6f4cd1ee3700b8906d42ed5.tar.gz
Update priority once the socket is open
-rw-r--r--cli-session.c1
-rw-r--r--common-session.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/cli-session.c b/cli-session.c
index c2e4863..8cd75f8 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -100,6 +100,7 @@ void cli_connected(int result, int sock, void* userdata, const char *errstring)
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 --git a/common-session.c b/common-session.c
index 6ca7f54..d95c2ee 100644
--- a/common-session.c
+++ b/common-session.c
@@ -552,6 +552,11 @@ void update_channel_prio() {
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];