Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."

Today's Topics:

   1. [PATCH] pptp: Cancel queued VPN agent msg when disconnected
      (Jussi Laakkonen)


----------------------------------------------------------------------

Date: Fri, 11 Oct 2019 16:52:35 +0300
From: Jussi Laakkonen <[email protected]>
Subject: [PATCH] pptp: Cancel queued VPN agent msg when disconnected
To: [email protected]
Message-ID: <[email protected]>

Queued VPN agent messages must be canceled if the plugin timeouts
without starting the process. This fixes the issue of having multiple
VPN agent queries stacked on another in such scenario, where PPTP is
awaiting for user input.
---
 vpn/plugins/pptp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/vpn/plugins/pptp.c b/vpn/plugins/pptp.c
index b7b2676a..116c38f0 100644
--- a/vpn/plugins/pptp.c
+++ b/vpn/plugins/pptp.c
@@ -606,7 +606,12 @@ static int pptp_error_code(struct vpn_provider *provider, 
int exit_code)
 
 static void pptp_disconnect(struct vpn_provider *provider)
 {
+       if (!provider)
+               return;
+
        vpn_provider_set_string(provider, "PPTP.Password", NULL);
+
+       connman_agent_cancel(provider);
 }
 
 static struct vpn_driver vpn_driver = {
-- 
2.20.1

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]


------------------------------

End of connman Digest, Vol 48, Issue 20
***************************************

Reply via email to