Zebediah Figura : server: Allow opening the Afd device with a file name.

Alexandre Julliard julliard at winehq.org
Tue May 25 16:08:14 CDT 2021


Module: wine
Branch: master
Commit: 30fd3019e1b9f0e05d6da911a3605dd7956e696c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=30fd3019e1b9f0e05d6da911a3605dd7956e696c

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon May 24 23:13:40 2021 -0500

server: Allow opening the Afd device with a file name.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50974
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;
 }
 




More information about the wine-cvs mailing list