summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-06-07 16:02:14 -0400
committerSimo Sorce <ssorce@redhat.com>2010-06-07 17:25:48 -0400
commitf9fc4df0c0a6401d185b057c17d6b30ef549b3d0 (patch)
treea05e5bcd06c9e970838bfa4e684ee39464aa055d /source3
parent22e9015e975096acf075240cc7d33f12c7c77395 (diff)
downloadsamba-f9fc4df0c0a6401d185b057c17d6b30ef549b3d0.tar.gz
samba-f9fc4df0c0a6401d185b057c17d6b30ef549b3d0.tar.bz2
samba-f9fc4df0c0a6401d185b057c17d6b30ef549b3d0.zip
s3:rpc make num_pipe_handles get an actual pipe as argument
Let the function abstract out how handles are counted
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/rpc_server/rpc_handles.c6
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9582884c2f..3d25688cf3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5152,9 +5152,9 @@ bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, in
/* The following definitions come from rpc_server/srv_eventlog_nt.c */
-/* The following definitions come from rpc_server/srv_lsa_hnd.c */
+/* The following definitions come from rpc_server/rpc_handles.c */
-size_t num_pipe_handles(struct handle_list *list);
+size_t num_pipe_handles(pipes_struct *p);
bool init_pipe_handle_list(pipes_struct *p,
const struct ndr_syntax_id *syntax);
bool create_policy_hnd(pipes_struct *p, struct policy_handle *hnd, void *data_ptr);
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;
}