From: Selva Nair Date: Tue, 10 Nov 2015 11:18:55 -0500 Message-Id: <1447172335-27411-1-git-send-email-selva.nair@...277...> In-Reply-To: <20151109205639.GL24952@...1296...> References: <20151109205639.GL24952@...1296...> In-Reply-To: <20151109205639.GL24952@...1296...> Subject: [Openvpn-devel] [PATCH for gui v2] Do not disconnect on suspend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Gert Doering , openvpn-devel@lists.sourceforge.net, =?UTF-8?q?Samuli=20Sepp=C3=A4nen?= On Mon, Nov 9, 2015 at 3:56 PM, Gert Doering wrote: > On Mon, Nov 09, 2015 at 03:35:23PM -0500, Selva Nair wrote: >> Requires the installer to update the registry during an upgrade of exisitng >> installations, or notify the end user of the change in the default value of >> disconnect_on_suspend (0). > > What does this patch *do*? Is this the "set up registry key on first > start" part (so we set the default differently now)? > > But that implies that an upgrade will not change the default, right? On further thought, its better to go more bold on this. Here is version 2 which culls the suspend processing. --8<-- Signed-off-by: Selva Nair --- main.c | 14 +------------- registry.c | 3 --- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/main.c b/main.c index 08c5663..bc3c41c 100644 --- a/main.c +++ b/main.c @@ -399,19 +399,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_POWERBROADCAST: switch (wParam) { case PBT_APMSUSPEND: - if (o.disconnect_on_suspend[0] == '1') - { - /* Suspend running connections */ - for (i=0; i