Pierre Schweitzer : mpr: Properly handle device-less connections.
Alexandre Julliard
julliard at winehq.org
Fri Sep 14 14:20:59 CDT 2018
Module: wine
Branch: master
Commit: 93fb279f4f3e150eee329b02ca5fb0251d8a239d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=93fb279f4f3e150eee329b02ca5fb0251d8a239d
Author: Pierre Schweitzer <pierre at reactos.org>
Date: Fri Sep 14 08:38:28 2018 +0200
mpr: Properly handle device-less connections.
Signed-off-by: Pierre Schweitzer <pierre at reactos.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mpr/wnet.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index 8d83bd6..4260ee1 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -2413,6 +2413,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
DWORD WINAPI WNetClearConnections ( HWND owner )
{
HANDLE connected;
+ PWSTR connection;
DWORD ret, size, count;
NETRESOURCEW * resources, * iter;
@@ -2446,7 +2447,14 @@ DWORD WINAPI WNetClearConnections ( HWND owner )
if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
{
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
break;
More information about the wine-cvs
mailing list