From 87f9f0b01a56f58eb7b03a44fed4f56cd94c7ff8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 13 Jan 2009 22:24:57 +0100 Subject: Always read with offset 0 from a named pipe --- source3/rpc_client/cli_pipe.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index c87df09019..99ca9eb4bc 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -176,15 +176,15 @@ static uint32 get_rpc_call_id(void) Read from a RPC named pipe ********************************************************************/ static NTSTATUS rpc_read_np(struct cli_state *cli, const char *pipe_name, - int fnum, char *buf, off_t offset, size_t size, + int fnum, char *buf, size_t size, ssize_t *pnum_read) { ssize_t num_read; - num_read = cli_read(cli, fnum, buf, offset, size); + num_read = cli_read(cli, fnum, buf, 0, size); - DEBUG(5,("rpc_read_np: num_read = %d, read offset: %u, to read: %u\n", - (int)num_read, (unsigned int)offset, (unsigned int)size)); + DEBUG(5,("rpc_read_np: num_read = %d, to read: %u\n", (int)num_read, + (unsigned int)size)); /* * A dos error of ERRDOS/ERRmoredata is not an error. @@ -270,8 +270,7 @@ static NTSTATUS rpc_read(struct rpc_pipe_client *cli, status = rpc_read_np(cli->trans.np.cli, cli->trans.np.pipe_name, cli->trans.np.fnum, pdata, - (off_t)stream_offset, size, - &num_read); + size, &num_read); break; case NCACN_IP_TCP: case NCACN_UNIX_STREAM: -- cgit