summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-24 11:45:33 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-24 11:45:33 +0000
commitbbb11d4a0dc02a6125855620e0a59a6b24107e4d (patch)
treeeccf9712b09d9936a5e8eed05c72596a3e8035c7 /source4/librpc/rpc/dcerpc.c
parent5e64ecac2f2de4888d83872aaf273e3c1882c772 (diff)
downloadsamba-bbb11d4a0dc02a6125855620e0a59a6b24107e4d.tar.gz
samba-bbb11d4a0dc02a6125855620e0a59a6b24107e4d.tar.bz2
samba-bbb11d4a0dc02a6125855620e0a59a6b24107e4d.zip
* prepared the dcerpc subsystem for adding the RPC over TCP transport
* fixed a uninitialised variable bug in pidl (found by valgrind) (This used to be commit 8bce61b8af6351c72c0dd84dc61b49d8aeb1fbbd)
Diffstat (limited to 'source4/librpc/rpc/dcerpc.c')
-rw-r--r--source4/librpc/rpc/dcerpc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 276b3c9ef4..495e36ec1f 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -40,10 +40,7 @@ struct dcerpc_pipe *dcerpc_pipe_init(struct cli_tree *tree)
p->reference_count = 0;
p->mem_ctx = mem_ctx;
- p->tree = tree;
- p->tree->reference_count++;
p->call_id = 1;
- p->fnum = 0;
return p;
}
@@ -54,7 +51,7 @@ void dcerpc_pipe_close(struct dcerpc_pipe *p)
if (!p) return;
p->reference_count--;
if (p->reference_count <= 0) {
- cli_tree_close(p->tree);
+ p->transport.shutdown_pipe(p);
talloc_destroy(p->mem_ctx);
}
}
@@ -167,7 +164,7 @@ NTSTATUS dcerpc_bind(struct dcerpc_pipe *p,
return status;
}
- status = dcerpc_raw_packet(p, mem_ctx, &blob, &blob_out);
+ status = p->transport.full_request(p, mem_ctx, &blob, &blob_out);
if (!NT_STATUS_IS_OK(status)) {
talloc_destroy(mem_ctx);
return status;
@@ -269,7 +266,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
return status;
}
- status = dcerpc_raw_packet_initial(p, mem_ctx, &blob_in);
+ status = p->transport.initial_request(p, mem_ctx, &blob_in);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -294,7 +291,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
}
/* send the pdu and get the initial response pdu */
- status = dcerpc_raw_packet(p, mem_ctx, &blob_in, &blob_out);
+ status = p->transport.full_request(p, mem_ctx, &blob_in, &blob_out);
status = dcerpc_pull(&blob_out, mem_ctx, &pkt);
if (!NT_STATUS_IS_OK(status)) {
@@ -320,7 +317,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
while (!(pkt.pfc_flags & DCERPC_PFC_FLAG_LAST)) {
uint32 length;
- status = dcerpc_raw_packet_secondary(p, mem_ctx, &blob_out);
+ status = p->transport.secondary_request(p, mem_ctx, &blob_out);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -596,5 +593,8 @@ failed:
*/
const char *dcerpc_server_name(struct dcerpc_pipe *p)
{
- return p->tree->session->transport->called.name;
+ if (!p->transport.peer_name) {
+ return "";
+ }
+ return p->transport.peer_name(p);
}