Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E531B200BA3 for ; Thu, 20 Oct 2016 09:51:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E3600160AE0; Thu, 20 Oct 2016 07:51:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 35756160ADB for ; Thu, 20 Oct 2016 09:51:58 +0200 (CEST) Received: (qmail 77607 invoked by uid 500); 20 Oct 2016 07:51:57 -0000 Mailing-List: contact commits-help@trafodion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@trafodion.apache.org Delivered-To: mailing list commits@trafodion.apache.org Received: (qmail 77597 invoked by uid 99); 20 Oct 2016 07:51:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2016 07:51:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D68881A0647 for ; Thu, 20 Oct 2016 07:51:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2PVbwYvTnDcp for ; Thu, 20 Oct 2016 07:51:53 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 95C215FBCF for ; Thu, 20 Oct 2016 07:51:52 +0000 (UTC) Received: (qmail 67516 invoked by uid 99); 20 Oct 2016 07:45:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2016 07:45:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C8670DFF8C; Thu, 20 Oct 2016 07:45:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ryzuo@apache.org To: commits@trafodion.incubator.apache.org Date: Thu, 20 Oct 2016 07:45:12 -0000 Message-Id: <4e969886f403439585ec893507c881c1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-trafodion git commit: [TRAFODION 1441] Cancel button dismisses the SQLDriverConnect prompt dialog but still tries to establish connection. archived-at: Thu, 20 Oct 2016 07:51:59 -0000 Repository: incubator-trafodion Updated Branches: refs/heads/master 85eaa6f1e -> 624bafbd0 [TRAFODION 1441] Cancel button dismisses the SQLDriverConnect prompt dialog but still tries to establish connection. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/95d4a88d Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/95d4a88d Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/95d4a88d Branch: refs/heads/master Commit: 95d4a88de58b4a1bed62d0a07f12fe098a72a49a Parents: b12b45e Author: rwbzx Authored: Mon Oct 17 12:03:05 2016 +0800 Committer: rwbzx Committed: Mon Oct 17 12:03:05 2016 +0800 ---------------------------------------------------------------------- win-odbc64/odbcclient/drvr35/cconnect.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/95d4a88d/win-odbc64/odbcclient/drvr35/cconnect.cpp ---------------------------------------------------------------------- diff --git a/win-odbc64/odbcclient/drvr35/cconnect.cpp b/win-odbc64/odbcclient/drvr35/cconnect.cpp index 05714b9..6cc6175 100644 --- a/win-odbc64/odbcclient/drvr35/cconnect.cpp +++ b/win-odbc64/odbcclient/drvr35/cconnect.cpp @@ -1086,7 +1086,7 @@ INT_PTR CALLBACK ConnectDriverKWDialogProc( PostMessage(hwndDlg,WM_QUIT,0,0); break; case IDCANCEL: - PostMessage(hwndDlg,WM_QUIT,0,0); + PostMessage(hwndDlg,WM_QUIT,1,0); break; } return TRUE; @@ -1761,10 +1761,16 @@ SQLRETURN CConnect::DriverConnect(SQLHWND WindowHandle, DispatchMessage(&msg); } } + DestroyWindow(hWndDlg); EnableWindow(WindowHandle,!b); - FreeLibrary(hinst); + + if (msg.wParam == 1)//IDCANCEL + { + setDiagRec(DRIVER_ERROR, IDS_HY_000, 0, "Operation Aborted."); + return SQL_ERROR; + } } else { BOOL b=EnableWindow(WindowHandle,FALSE); @@ -1783,8 +1789,13 @@ SQLRETURN CConnect::DriverConnect(SQLHWND WindowHandle, } DestroyWindow(hWndDlg); EnableWindow(WindowHandle,!b); - FreeLibrary(hinst); + + if (msg.wParam == 1)//IDCANCEL + { + setDiagRec(DRIVER_ERROR, IDS_HY_000, 0, "Operation Aborted."); + return SQL_ERROR; + } } }