]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Unset got_cancel_cmd after reacting to it, as is already done for got_pause_cmd
authorDaniel Lenski <dlenski@gmail.com>
Sat, 15 Oct 2016 01:46:34 +0000 (18:46 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 13 Dec 2016 11:46:13 +0000 (11:46 +0000)
Per David Woodhouse (http://lists.infradead.org/pipermail/openconnect-devel/2016-October/004034.html):

> I think it's probably OK to set vpninfo->got_cancel_cmd=0 in the mainloop
> right before calling proto->vpn_close_session.  If we get cancelled
> *again* then we'll give up on that too.

Without this fix, do_https_request() can't be used to close the
session — it interrupts itself as soon as it sees that got_cancel_cmd is
set.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
mainloop.c

index 6a1e7d6520ba32debc98bf4d52b2022b645c6b8d..efe493a16c62c9b5739f3f5faa9da1df93fd2f2b 100644 (file)
@@ -246,6 +246,7 @@ int openconnect_mainloop(struct openconnect_info *vpninfo,
                        } else {
                                ret = -ECONNABORTED;
                        }
+                       vpninfo->got_cancel_cmd = 0;
                        break;
                }