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

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 1 15:37:30 CST 2005


ChangeSet ID:	21026
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/01 15:37:30

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

Log message:
	Vitaliy Margolen <wine-patch at kievinfo.com>
	Fix error returned when exceeding allowed instances.

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

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

Index: wine/server/named_pipe.c
diff -u -p wine/server/named_pipe.c:1.50 wine/server/named_pipe.c:1.51
--- wine/server/named_pipe.c:1.50	1 Nov 2005 21:37:30 -0000
+++ wine/server/named_pipe.c	1 Nov 2005 21:37:30 -0000
@@ -562,10 +562,9 @@ DECL_HANDLER(create_named_pipe)
     }
     else
     {
-        set_error( 0 );  /* clear the name collision */
         if (pipe->maxinstances <= pipe->instances)
         {
-            set_error( STATUS_PIPE_BUSY );
+            set_error( STATUS_INSTANCE_NOT_AVAILABLE );
             release_object( pipe );
             return;
         }
@@ -577,6 +576,7 @@ DECL_HANDLER(create_named_pipe)
             release_object( pipe );
             return;
         }
+        set_error( 0 );  /* clear the name collision */
     }
 
     server = create_pipe_server( pipe, req->options );
Index: wine/dlls/ntdll/tests/om.c
diff -u -p wine/dlls/ntdll/tests/om.c:1.2 wine/dlls/ntdll/tests/om.c:1.3
--- wine/dlls/ntdll/tests/om.c:1.2	1 Nov 2005 21:37:30 -0000
+++ wine/dlls/ntdll/tests/om.c	1 Nov 2005 21:37:30 -0000
@@ -109,7 +109,7 @@ void test_namespace_pipe(void)
 
     status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE,
                                     FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout);
-    todo_wine ok(status == STATUS_INSTANCE_NOT_AVAILABLE,
+    ok(status == STATUS_INSTANCE_NOT_AVAILABLE,
         "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08lx)\n", status);
 
     pRtlInitUnicodeString(&str, buffer2);



More information about the wine-cvs mailing list