Commit 8c21cb5c by Henning Schaffaf

Fix fallback credentials: The call to CoInitializeEx fails if it was previously…

Fix fallback credentials: The call to CoInitializeEx fails if it was previously been set to a different mode.
parent c9dc30ff
......@@ -219,6 +219,7 @@ static int fallback_cred_acquire_cb(
* as an authentication mechanism */
if (GIT_CREDTYPE_DEFAULT & allowed_types) {
wchar_t *wide_url;
HRESULT hCoInitResult;
/* Convert URL to wide characters */
if (git__utf8_to_16_alloc(&wide_url, url) < 0) {
......@@ -226,7 +227,9 @@ static int fallback_cred_acquire_cb(
return -1;
}
if (SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED))) {
hCoInitResult = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if (SUCCEEDED(hCoInitResult) || hCoInitResult == RPC_E_CHANGED_MODE) {
IInternetSecurityManager* pISM;
/* And if the target URI is in the My Computer, Intranet, or Trusted zones */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment