summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-13 22:24:57 +0100
committerVolker Lendecke <vl@samba.org>2009-01-14 17:08:39 +0100
commit87f9f0b01a56f58eb7b03a44fed4f56cd94c7ff8 (patch)
tree15e0652b7588636ce81ae1ce15503d4c3bced26e /source3/rpc_client
parent990491d187a77cd0347cf7a17e18bb794b7ba793 (diff)
downloadsamba-87f9f0b01a56f58eb7b03a44fed4f56cd94c7ff8.tar.gz
samba-87f9f0b01a56f58eb7b03a44fed4f56cd94c7ff8.tar.bz2
samba-87f9f0b01a56f58eb7b03a44fed4f56cd94c7ff8.zip
Always read with offset 0 from a named pipe
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c11
1 files changed, 5 insertions, 6 deletions
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: