=?UTF-8?Q?Michael=20M=C3=BCller=20?=: mpr: Return correct error code for non network paths and REMOTE_NAME_INFO_LEVEL in WNetGetUniversalName.
Alexandre Julliard
julliard at winehq.org
Wed Mar 14 17:37:17 CDT 2018
Module: wine
Branch: master
Commit: 31e5b4e5ee385e3d955545fbfa8ec79b77819b2a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=31e5b4e5ee385e3d955545fbfa8ec79b77819b2a
Author: Michael Müller <michael at fds-team.de>
Date: Tue Mar 13 20:32:33 2018 -0500
mpr: Return correct error code for non network paths and REMOTE_NAME_INFO_LEVEL in WNetGetUniversalName.
Signed-off-by: Michael Müller <michael at fds-team.de>
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mpr/tests/mpr.c | 9 +++------
dlls/mpr/wnet.c | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c
index 330e66b..041afbf 100644
--- a/dlls/mpr/tests/mpr.c
+++ b/dlls/mpr/tests/mpr.c
@@ -101,25 +101,23 @@ static void test_WNetGetRemoteName(void)
info_size = sizeof(buffer);
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, &info_size);
- todo_wine{
if(drive_type == DRIVE_REMOTE)
+ todo_wine
ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
- }
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
fail_size = 0;
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, &fail_size);
- todo_wine{
if(drive_type == DRIVE_REMOTE)
+ todo_wine
ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
- }
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, NULL);
todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
@@ -127,13 +125,12 @@ static void test_WNetGetRemoteName(void)
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
NULL, &info_size);
- todo_wine {
if(drive_type == DRIVE_REMOTE)
+ todo_wine
ok(ret == WN_BAD_POINTER || ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
- }
fail_size = sizeof(driveA) / sizeof(char) - 1;
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index 7b24693..78759ec 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -2348,7 +2348,7 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
break;
}
case REMOTE_NAME_INFO_LEVEL:
- err = WN_NO_NETWORK;
+ err = WN_NOT_CONNECTED;
break;
default:
More information about the wine-cvs
mailing list