wine/ server/named_pipe.c dlls/ntdll/tests/om.c

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 2 08:15:10 CST 2005


ChangeSet ID:	21045
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/02 08:15:10

Modified files:
	server         : named_pipe.c 
	dlls/ntdll/tests: om.c 

Log message:
	Vitaliy Margolen <wine-patch at kievinfo.com>
	Fix error returned when opening nonexistent pipes.

Patch: http://cvs.winehq.org/patch.py?id=21045

Old revision  New revision  Changes     Path
 1.51          1.52          +1 -5       wine/server/named_pipe.c
 1.3           1.4           +2 -2       wine/dlls/ntdll/tests/om.c

Index: wine/server/named_pipe.c
diff -u -p wine/server/named_pipe.c:1.51 wine/server/named_pipe.c:1.52
--- wine/server/named_pipe.c:1.51	2 Nov 2005 14:15:10 -0000
+++ wine/server/named_pipe.c	2 Nov 2005 14:15:10 -0000
@@ -598,12 +598,8 @@ DECL_HANDLER(open_named_pipe)
     struct named_pipe *pipe;
     int fds[2];
 
-    pipe = open_named_pipe( get_req_data(), get_req_data_size(), req->attributes );
-    if (!pipe)
-    {
-        set_error( STATUS_NO_SUCH_FILE );
+    if (!(pipe = open_named_pipe( get_req_data(), get_req_data_size(), req->attributes )))
         return;
-    }
 
     server = find_server2( pipe, ps_idle_server, ps_wait_open );
     release_object( pipe );
Index: wine/dlls/ntdll/tests/om.c
diff -u -p wine/dlls/ntdll/tests/om.c:1.3 wine/dlls/ntdll/tests/om.c:1.4
--- wine/dlls/ntdll/tests/om.c:1.3	2 Nov 2005 14:15:10 -0000
+++ wine/dlls/ntdll/tests/om.c	2 Nov 2005 14:15:10 -0000
@@ -127,13 +127,13 @@ void test_namespace_pipe(void)
     pRtlInitUnicodeString(&str, buffer3);
     InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
     status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
-    todo_wine ok(status == STATUS_OBJECT_PATH_NOT_FOUND,
+    todo_wine ok(status == STATUS_OBJECT_PATH_NOT_FOUND || status == STATUS_PIPE_NOT_AVAILABLE,
         "pNtOpenFile should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08lx)\n", status);
 
     pRtlInitUnicodeString(&str, buffer4);
     InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
     status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
-    todo_wine ok(status == STATUS_OBJECT_NAME_NOT_FOUND,
+    ok(status == STATUS_OBJECT_NAME_NOT_FOUND,
         "pNtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08lx)\n", status);
 
     pNtClose(pipe);



More information about the wine-cvs mailing list