summaryrefslogtreecommitdiff
path: root/src/openvpnmsica
diff options
context:
space:
mode:
authorBernhard Schmidt <berni@debian.org>2020-10-28 19:46:08 +0100
committerBernhard Schmidt <berni@debian.org>2020-10-28 19:46:08 +0100
commit8231554c9f1ba25cb4e698ad5cfb3a56b258610a (patch)
tree029108888123856ca13e34c612d4dd4845c2b6c3 /src/openvpnmsica
parent5bac5f7608a14e0989e95db1a1da2e65d9322127 (diff)
parent76fee93e6fe89e5575bae2840b585d2f025b9050 (diff)
Merge tag 'debian/2.5.0-1' into buster-backports
openvpn Debian release 2.5.0-1
Diffstat (limited to 'src/openvpnmsica')
-rw-r--r--src/openvpnmsica/dllmain.c2
-rw-r--r--src/openvpnmsica/openvpnmsica.c16
2 files changed, 7 insertions, 11 deletions
diff --git a/src/openvpnmsica/dllmain.c b/src/openvpnmsica/dllmain.c
index 201fd9a..34946ed 100644
--- a/src/openvpnmsica/dllmain.c
+++ b/src/openvpnmsica/dllmain.c
@@ -193,6 +193,6 @@ x_msg_va(const unsigned int flags, const char *format, va_list arglist)
}
}
- MsiProcessMessage(s->hInstall, INSTALLMESSAGE_ERROR, hRecordProg);
+ MsiProcessMessage(s->hInstall, (flags & M_WARN) ? INSTALLMESSAGE_INFO : INSTALLMESSAGE_ERROR, hRecordProg);
MsiCloseHandle(hRecordProg);
}
diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c
index 31e90bd..de1cf65 100644
--- a/src/openvpnmsica/openvpnmsica.c
+++ b/src/openvpnmsica/openvpnmsica.c
@@ -248,7 +248,7 @@ cleanup_OpenSCManager:
}
-static UINT
+static void
find_adapters(
_In_ MSIHANDLE hInstall,
_In_z_ LPCTSTR szzHardwareIDs,
@@ -262,12 +262,12 @@ find_adapters(
uiResult = tap_list_adapters(NULL, szzHardwareIDs, &pAdapterList);
if (uiResult != ERROR_SUCCESS)
{
- return uiResult;
+ return;
}
else if (pAdapterList == NULL)
{
/* No adapters - no fun. */
- return ERROR_SUCCESS;
+ return;
}
/* Get IPv4/v6 info for all network adapters. Actually, we're interested in link status only: up/down? */
@@ -394,7 +394,6 @@ cleanup_pAdapterAdresses:
free(pAdapterAdresses);
cleanup_pAdapterList:
tap_free_adapter_list(pAdapterList);
- return uiResult;
}
@@ -1096,12 +1095,9 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall)
dwResult = tap_create_adapter(NULL, NULL, szHardwareId, &bRebootRequired, &guidAdapter);
if (dwResult == ERROR_SUCCESS)
{
- /* Set adapter name. */
- dwResult = tap_set_adapter_name(&guidAdapter, szName);
- if (dwResult != ERROR_SUCCESS)
- {
- tap_delete_adapter(NULL, &guidAdapter, &bRebootRequired);
- }
+ /* Set adapter name. May fail on some machines, but that is not critical - use silent
+ flag to mute messagebox and print error only to log */
+ tap_set_adapter_name(&guidAdapter, szName, TRUE);
}
}
else if (wcsncmp(szArg[i], L"deleteN=", 8) == 0)