Commit 93fb279f authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

mpr: Properly handle device-less connections.

parent a220669f
...@@ -2413,6 +2413,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel, ...@@ -2413,6 +2413,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
DWORD WINAPI WNetClearConnections ( HWND owner ) DWORD WINAPI WNetClearConnections ( HWND owner )
{ {
HANDLE connected; HANDLE connected;
PWSTR connection;
DWORD ret, size, count; DWORD ret, size, count;
NETRESOURCEW * resources, * iter; NETRESOURCEW * resources, * iter;
...@@ -2446,7 +2447,14 @@ DWORD WINAPI WNetClearConnections ( HWND owner ) ...@@ -2446,7 +2447,14 @@ DWORD WINAPI WNetClearConnections ( HWND owner )
if (ret == WN_SUCCESS || ret == WN_MORE_DATA) if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
{ {
for (iter = resources; count; count--, iter++) for (iter = resources; count; count--, iter++)
WNetCancelConnection2W(iter->lpLocalName, 0, TRUE); {
if (iter->lpLocalName && iter->lpLocalName[0])
connection = iter->lpLocalName;
else
connection = iter->lpRemoteName;
WNetCancelConnection2W(connection, 0, TRUE);
}
} }
else else
break; break;
......
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