testprogs/win32/rpcecho-win32-pipe works??
[metze/samba/wip.git] / testprogs / win32 / rpcecho-win32-pipe / server.c
index 598a5d3db0c8e9ed7df758c9154ad9510c1862d8..9324ff3679e686e8e669dffd02592c08dc03c7c0 100755 (executable)
@@ -153,17 +153,21 @@ void TestBytePipeIn(
        ASYNC_BYTE_PIPE *in_pipe)
 {
        long ret;
-       byte in_bytes[0x80000];
+       byte *in_bytes;
+       int in_alloc_size;
        int in_bytes_count;
        int i;
 
        printf("TestBytePipeIn: Start\n");
        fflush(stdout);
 
-       in_bytes_count = sizeof(in_bytes);
+       in_alloc_size = 5840 * sizeof(byte);
+       in_bytes = malloc(in_alloc_size);
+
+       in_bytes_count = chunk_size;
        for (i=0; in_bytes_count > 0; i++) {
-               in_bytes_count = sizeof(in_bytes);
-               in_pipe->pull(in_pipe->state, in_bytes, sizeof(byte), &in_bytes_count);
+               in_bytes_count = 0;
+               in_pipe->pull(in_pipe->state, in_bytes, in_alloc_size, &in_bytes_count);
                printf("pull[%u] bytes_count[%u]\n", i, in_bytes_count);
                fflush(stdout);
        }