[PATCH 3/3] Unset got_cancel_cmd after reacting to it, as is already done for got_pause_cmd

Daniel Lenski dlenski at gmail.com
Fri Oct 14 18:46:34 PDT 2016


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 at gmail.com>
---
 mainloop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mainloop.c b/mainloop.c
index 6a1e7d6..efe493a 100644
--- a/mainloop.c
+++ b/mainloop.c
@@ -246,6 +246,7 @@ int openconnect_mainloop(struct openconnect_info *vpninfo,
 			} else {
 				ret = -ECONNABORTED;
 			}
+			vpninfo->got_cancel_cmd = 0;
 			break;
 		}
 
-- 
2.7.4




More information about the openconnect-devel mailing list