]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2010/01/29 20:16:17
authordjm <djm>
Sat, 30 Jan 2010 06:36:33 +0000 (06:36 +0000)
committerdjm <djm>
Sat, 30 Jan 2010 06:36:33 +0000 (06:36 +0000)
     [mux.c]
     kill correct channel (was killing already-dead mux channel, not
     its session channel)

ChangeLog
mux.c

index 67cf0fc1df6068340a4fb1981f4aa7b877bb9e7e..37c5fa4e53cc2a173c47c03bf9ad1334dde8a2c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,10 @@
      [sshd.c]
      set FD_CLOEXEC on sock_in/sock_out; bz#1706 from jchadima AT redhat.com
      ok dtucker@
+   - djm@cvs.openbsd.org 2010/01/29 20:16:17
+     [mux.c]
+     kill correct channel (was killing already-dead mux channel, not
+     its session channel)
 
 20100129
  - (dtucker) [openbsd-compat/openssl-compat.c] Bug #1707: Call OPENSSL_config()
diff --git a/mux.c b/mux.c
index 0e07883e4666f0cb5181cb440121f50dd1f2dfef..825fb7a9a70d648333190ad5b4457888f5ef7832 100644 (file)
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.13 2010/01/29 20:16:17 djm Exp $ */
+/* $OpenBSD: mux.c,v 1.14 2010/01/30 02:54:53 djm Exp $ */
 /*
  * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
  *
@@ -214,8 +214,10 @@ mux_master_control_cleanup_cb(int cid, void *unused)
                        debug2("%s: channel %d: not open", __func__, sc->self);
                        chan_mark_dead(sc);
                } else {
-                       chan_read_failed(sc);
-                       chan_write_failed(sc);
+                       if (sc->istate == CHAN_INPUT_OPEN)
+                               chan_read_failed(sc);
+                       if (sc->ostate == CHAN_OUTPUT_OPEN)
+                               chan_write_failed(sc);
                }
        }
        channel_cancel_cleanup(c->self);
This page took 0.052526 seconds and 5 git commands to generate.