mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:librpc: remove recv_data from transport
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jan 7 12:42:32 CET 2014 on sn-devel-104
This commit is contained in:
parent
9d2557d6e4
commit
6b586c3cf6
@ -1029,8 +1029,6 @@ static void dcerpc_connection_dead(struct dcecli_connection *conn, NTSTATUS stat
|
|||||||
TALLOC_FREE(conn->io_trigger);
|
TALLOC_FREE(conn->io_trigger);
|
||||||
conn->io_trigger_pending = false;
|
conn->io_trigger_pending = false;
|
||||||
|
|
||||||
conn->transport.recv_data = NULL;
|
|
||||||
|
|
||||||
dcerpc_shutdown_pipe(conn, status);
|
dcerpc_shutdown_pipe(conn, status);
|
||||||
|
|
||||||
/* all pending requests get the error */
|
/* all pending requests get the error */
|
||||||
@ -1077,6 +1075,10 @@ static void dcerpc_recv_data(struct dcecli_connection *conn, DATA_BLOB *blob, NT
|
|||||||
{
|
{
|
||||||
struct ncacn_packet pkt;
|
struct ncacn_packet pkt;
|
||||||
|
|
||||||
|
if (conn->dead) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (NT_STATUS_IS_OK(status) && blob->length == 0) {
|
if (NT_STATUS_IS_OK(status) && blob->length == 0) {
|
||||||
status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
|
status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
|
||||||
}
|
}
|
||||||
@ -1192,8 +1194,6 @@ struct tevent_req *dcerpc_bind_send(TALLOC_CTX *mem_ctx,
|
|||||||
return tevent_req_post(req, ev);
|
return tevent_req_post(req, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->conn->transport.recv_data = dcerpc_recv_data;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* we allocate a dcerpc_request so we can be in the same
|
* we allocate a dcerpc_request so we can be in the same
|
||||||
* request queue as normal requests
|
* request queue as normal requests
|
||||||
@ -1531,8 +1531,6 @@ static struct rpc_request *dcerpc_request_send(TALLOC_CTX *mem_ctx,
|
|||||||
{
|
{
|
||||||
struct rpc_request *req;
|
struct rpc_request *req;
|
||||||
|
|
||||||
p->conn->transport.recv_data = dcerpc_recv_data;
|
|
||||||
|
|
||||||
req = talloc_zero(mem_ctx, struct rpc_request);
|
req = talloc_zero(mem_ctx, struct rpc_request);
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2080,8 +2078,6 @@ struct tevent_req *dcerpc_alter_context_send(TALLOC_CTX *mem_ctx,
|
|||||||
return tevent_req_post(req, ev);
|
return tevent_req_post(req, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->conn->transport.recv_data = dcerpc_recv_data;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* we allocate a dcerpc_request so we can be in the same
|
* we allocate a dcerpc_request so we can be in the same
|
||||||
* request queue as normal requests
|
* request queue as normal requests
|
||||||
@ -2271,9 +2267,7 @@ static void dcerpc_transport_dead(struct dcecli_connection *c, NTSTATUS status)
|
|||||||
status = NT_STATUS_END_OF_FILE;
|
status = NT_STATUS_END_OF_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->transport.recv_data) {
|
dcerpc_recv_data(c, NULL, status);
|
||||||
c->transport.recv_data(c, NULL, status);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2412,9 +2406,7 @@ static void dcerpc_send_read_done(struct tevent_req *subreq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->transport.recv_data) {
|
dcerpc_recv_data(p, &blob, NT_STATUS_OK);
|
||||||
p->transport.recv_data(p, &blob, NT_STATUS_OK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dcerpc_send_request_state {
|
struct dcerpc_send_request_state {
|
||||||
|
@ -78,10 +78,6 @@ struct dcecli_connection {
|
|||||||
enum dcerpc_transport_t transport;
|
enum dcerpc_transport_t transport;
|
||||||
void *private_data;
|
void *private_data;
|
||||||
|
|
||||||
/* a callback to the dcerpc code when a full fragment
|
|
||||||
has been received */
|
|
||||||
void (*recv_data)(struct dcecli_connection *, DATA_BLOB *, NTSTATUS status);
|
|
||||||
|
|
||||||
struct tstream_context *stream;
|
struct tstream_context *stream;
|
||||||
/** to serialize write events */
|
/** to serialize write events */
|
||||||
struct tevent_queue *write_queue;
|
struct tevent_queue *write_queue;
|
||||||
|
@ -162,8 +162,6 @@ static void dcerpc_pipe_open_smb_done(struct tevent_req *subreq)
|
|||||||
c->transport.transport = NCACN_NP;
|
c->transport.transport = NCACN_NP;
|
||||||
c->transport.private_data = NULL;
|
c->transport.private_data = NULL;
|
||||||
|
|
||||||
c->transport.recv_data = NULL;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Windows uses 4280 for ncacn_np,
|
* Windows uses 4280 for ncacn_np,
|
||||||
* so we also use it, this is what our
|
* so we also use it, this is what our
|
||||||
|
@ -90,8 +90,6 @@ static void continue_socket_connect(struct composite_context *ctx)
|
|||||||
conn->transport.transport = s->transport;
|
conn->transport.transport = s->transport;
|
||||||
conn->transport.private_data = NULL;
|
conn->transport.private_data = NULL;
|
||||||
|
|
||||||
conn->transport.recv_data = NULL;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Windows uses 5840 for ncacn_ip_tcp,
|
* Windows uses 5840 for ncacn_ip_tcp,
|
||||||
* so we also use it (for every transport which uses bsd sockets)
|
* so we also use it (for every transport which uses bsd sockets)
|
||||||
|
Loading…
Reference in New Issue
Block a user