[PATCH 2/4] server: Allow opening the Afd device with a file name.

Zebediah Figura z.figura12 at gmail.com
Mon May 24 23:13:40 CDT 2021


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50974
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/ws2_32/tests/afd.c | 2 +-
 server/sock.c           | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/ws2_32/tests/afd.c b/dlls/ws2_32/tests/afd.c
index a02b4f3da27..48b177ee845 100644
--- a/dlls/ws2_32/tests/afd.c
+++ b/dlls/ws2_32/tests/afd.c
@@ -64,7 +64,7 @@ static void test_open_device(void)
     RtlInitUnicodeString(&string, L"\\Device\\Afd\\foobar");
     InitializeObjectAttributes(&attr, &string, 0, NULL, NULL);
     ret = NtOpenFile(&handle, SYNCHRONIZE, &attr, &io, 0, 0);
-    todo_wine ok(!ret, "got %#x\n", ret);
+    ok(!ret, "got %#x\n", ret);
     CloseHandle(handle);
 
     s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
diff --git a/server/sock.c b/server/sock.c
index 7f8d9760afb..ab5aa57a6cd 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1981,6 +1981,7 @@ static void socket_device_dump( struct object *obj, int verbose )
 static struct object *socket_device_lookup_name( struct object *obj, struct unicode_str *name,
                                                  unsigned int attr, struct object *root )
 {
+    if (name) name->len = 0;
     return NULL;
 }
 
-- 
2.30.2




More information about the wine-devel mailing list