From f9fc4df0c0a6401d185b057c17d6b30ef549b3d0 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 7 Jun 2010 16:02:14 -0400 Subject: s3:rpc make num_pipe_handles get an actual pipe as argument Let the function abstract out how handles are counted --- source3/rpc_server/rpc_handles.c | 6 +++--- source3/rpc_server/srv_spoolss_nt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/rpc_handles.c b/source3/rpc_server/rpc_handles.c index 7cc1b43611..fa4100fb97 100644 --- a/source3/rpc_server/rpc_handles.c +++ b/source3/rpc_server/rpc_handles.c @@ -62,12 +62,12 @@ static bool is_samr_lsa_pipe(const struct ndr_syntax_id *syntax) || ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id)); } -size_t num_pipe_handles(struct handle_list *list) +size_t num_pipe_handles(pipes_struct *p) { - if (list == NULL) { + if (p->pipe_handles == NULL) { return 0; } - return list->count; + return p->pipe_handles->count; } /**************************************************************************** diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 104efdc274..8ebc7fa64f 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -593,7 +593,7 @@ static bool open_printer_hnd(pipes_struct *p, struct policy_handle *hnd, new_printer->access_granted = access_granted; DEBUG(5, ("%d printer handles active\n", - (int)num_pipe_handles(p->pipe_handles))); + (int)num_pipe_handles(p))); return true; } -- cgit