Skip to content

Commit

Permalink
chore: fix formatting and gui
Browse files Browse the repository at this point in the history
  • Loading branch information
karenc-bq committed Aug 28, 2024
1 parent 59c82d4 commit 4afe64e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, version 2.0
// (GPLv2), as published by the Free Software Foundation, with the
// following additional permissions:
//
// This program is distributed with certain software that is licensed
// under separate terms, as designated in a particular file or component
// or in the license documentation. Without limiting your rights under
// the GPLv2, the authors of this program hereby grant you an additional
// permission to link the program and your derivative works with the
// separately licensed software that they have included with the program.
//
// Without limiting the foregoing grant of rights under the GPLv2 and
// additional permission as to separately licensed software, this
// program is also subject to the Universal FOSS Exception, version 1.0,
// a copy of which can be found along with its FAQ at
// http://oss.oracle.com/licenses/universal-foss-exception.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License, version 2.0, for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see
// http://www.gnu.org/licenses/gpl-2.0.html.

Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
Expand Down
6 changes: 3 additions & 3 deletions setupgui/windows/odbcdialogparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,12 +708,12 @@ void FormMain_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
wchar_t authMode[20];
ComboBox_GetText(GetDlgItem(authTab, IDC_EDIT_AUTH_MODE), authMode, sizeof(authMode));

BOOL usingIAM = wcscmp(authMode, L"IAM") == 0;
BOOL usingIAM = wcsicmp(authMode, L"IAM") == 0;
EnableWindow(port, usingIAM);
EnableWindow(host, usingIAM);
EnableWindow(expiration, usingIAM);

BOOL usingSecretsManager = wcscmp(authMode, L"SECRETS MANAGER") == 0;
BOOL usingSecretsManager = wcsicmp(authMode, L"SECRETS MANAGER") == 0;
EnableWindow(secret_id, usingSecretsManager);
}
break;
Expand All @@ -738,7 +738,7 @@ void FormMain_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
wchar_t fedMode[20];
ComboBox_GetText(GetDlgItem(fedAuthMode, IDC_EDIT_FED_AUTH_MODE), fedMode, sizeof(fedMode));

BOOL usingOkta = wcscmp(fedMode, L"OKTA") != 0;
BOOL usingOkta = wcsicmp(fedMode, L"OKTA") == 0;
EnableWindow(appId, usingOkta);
}
break;
Expand Down
4 changes: 3 additions & 1 deletion util/installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,9 @@ void DataSource::reset() {
this->opt_MONITOR_DISPOSAL_TIME.set_default(MONITOR_DISPOSAL_TIME_MS);
this->opt_FAILURE_DETECTION_TIMEOUT.set_default(FAILURE_DETECTION_TIMEOUT_SECS);

this->opt_AUTH_PORT.set_default(-1);
this->opt_IDP_PORT.set_default(-1);
this->opt_AUTH_PORT.set_default(opt_PORT);
this->opt_AUTH_EXPIRATION.set_default(900); // 15 minutes
}

SQLWSTRING DataSource::to_kvpair(SQLWCHAR delim) {
Expand Down

0 comments on commit 4afe64e

Please sign in to comment.