mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
rpc_server3: Inline make_base_pipes_struct() into rpc_worker.c
This is the only user, and in winbind_dual_ndr.c's make_internal_ncacn_conn we have another creator of pipes_struct. So it seems not necessary to keep this public. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
0f9f1fa0c2
commit
2777fde6a1
@ -35,42 +35,6 @@
|
||||
|
||||
static size_t num_handles = 0;
|
||||
|
||||
int make_base_pipes_struct(TALLOC_CTX *mem_ctx,
|
||||
struct messaging_context *msg_ctx,
|
||||
const char *pipe_name,
|
||||
enum dcerpc_transport_t transport,
|
||||
const struct tsocket_address *remote_address,
|
||||
const struct tsocket_address *local_address,
|
||||
struct pipes_struct **_p)
|
||||
{
|
||||
struct pipes_struct *p;
|
||||
|
||||
p = talloc_zero(mem_ctx, struct pipes_struct);
|
||||
if (!p) {
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
p->msg_ctx = msg_ctx;
|
||||
p->transport = transport;
|
||||
|
||||
p->remote_address = tsocket_address_copy(remote_address, p);
|
||||
if (p->remote_address == NULL) {
|
||||
talloc_free(p);
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
if (local_address) {
|
||||
p->local_address = tsocket_address_copy(local_address, p);
|
||||
if (p->local_address == NULL) {
|
||||
talloc_free(p);
|
||||
return ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
*_p = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool check_open_pipes(void)
|
||||
{
|
||||
if (num_handles > 0) {
|
||||
|
@ -65,14 +65,6 @@ struct pipes_struct {
|
||||
struct dcesrv_call_state *dce_call;
|
||||
};
|
||||
|
||||
int make_base_pipes_struct(TALLOC_CTX *mem_ctx,
|
||||
struct messaging_context *msg_ctx,
|
||||
const char *pipe_name,
|
||||
enum dcerpc_transport_t transport,
|
||||
const struct tsocket_address *remote_address,
|
||||
const struct tsocket_address *local_address,
|
||||
struct pipes_struct **_p);
|
||||
|
||||
bool check_open_pipes(void);
|
||||
size_t num_pipe_handles(void);
|
||||
|
||||
|
@ -161,6 +161,43 @@ static int dcesrv_connection_destructor(struct dcesrv_connection *conn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int make_base_pipes_struct(
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct messaging_context *msg_ctx,
|
||||
const char *pipe_name,
|
||||
enum dcerpc_transport_t transport,
|
||||
const struct tsocket_address *remote_address,
|
||||
const struct tsocket_address *local_address,
|
||||
struct pipes_struct **_p)
|
||||
{
|
||||
struct pipes_struct *p;
|
||||
|
||||
p = talloc_zero(mem_ctx, struct pipes_struct);
|
||||
if (!p) {
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
p->msg_ctx = msg_ctx;
|
||||
p->transport = transport;
|
||||
|
||||
p->remote_address = tsocket_address_copy(remote_address, p);
|
||||
if (p->remote_address == NULL) {
|
||||
talloc_free(p);
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
if (local_address) {
|
||||
p->local_address = tsocket_address_copy(local_address, p);
|
||||
if (p->local_address == NULL) {
|
||||
talloc_free(p);
|
||||
return ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
*_p = p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* A new client has been passed to us from samba-dcerpcd.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user