summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-09 20:17:11 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-09 20:17:11 +0000
commit8158620124504a1ece1f1191cb8f273709039bd2 (patch)
tree883849bc6d1dd3f71e7deef4b494adb28cefde77 /source3/rpc_client/cli_pipe.c
parent4e004a0b5e7521a361444f6d67a3c2910c5688c2 (diff)
downloadsamba-8158620124504a1ece1f1191cb8f273709039bd2.tar.gz
samba-8158620124504a1ece1f1191cb8f273709039bd2.tar.bz2
samba-8158620124504a1ece1f1191cb8f273709039bd2.zip
dce/rpc.
(This used to be commit e0445419b2d50ae6efef36f4f295ebcfdbf1ad82)
Diffstat (limited to 'source3/rpc_client/cli_pipe.c')
-rw-r--r--source3/rpc_client/cli_pipe.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 0b9a4e95e5..732161ad82 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -37,12 +37,17 @@ extern pstring global_myname;
/********************************************************************
rpc pipe call id
********************************************************************/
+static uint32 call_id = 0;
static uint32 get_rpc_call_id(void)
{
- static uint32 call_id = 1;
return ++call_id;
}
+static uint32 reset_rpc_call_id(void)
+{
+ call_id = 0;
+}
+
/*******************************************************************
uses SMBreadX to get rest of rpc data
********************************************************************/
@@ -451,7 +456,7 @@ static BOOL create_rpc_request(prs_struct *rhdr, uint8 op_num, int data_len,
if (auth_len != 0)
{
- alloc_hint = data_len - 0x18 - auth_len - 10;
+ alloc_hint = data_len - 0x18 - auth_len - 16;
}
else
{
@@ -849,6 +854,8 @@ static BOOL rpc_pipe_bind(struct cli_state *cli, char *pipe_name,
prs_mem_free(&rdata );
prs_mem_free(&rparam );
+ reset_rpc_call_id();
+
return valid_ack;
}
@@ -862,6 +869,8 @@ BOOL cli_nt_session_open(struct cli_state *cli, char *pipe_name, BOOL encrypted)
RPC_IFACE transfer;
int fnum;
+ reset_rpc_call_id();
+
/******************* open the pipe *****************/
if (IS_BITS_SET_ALL(cli->capabilities, CAP_NT_SMBS))
{