prs_struct data;
} input_data;
-/*
- * Handle database - stored per pipe.
- */
-
-struct policy {
- struct policy *next, *prev;
-
- struct policy_handle pol_hnd;
-
- void *data_ptr;
-};
-
-struct handle_list {
- struct policy *Policy; /* List of policies. */
- size_t count; /* Current number of handles. */
- size_t pipe_ref_count; /* Number of pipe handles referring to this list. */
-};
+struct handle_list;
/* Domain controller authentication protocol info */
struct dcinfo {
/* The following definitions come from rpc_server/srv_lsa_hnd.c */
+size_t num_pipe_handles(struct handle_list *list);
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);
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
+/*
+ * Handle database - stored per pipe.
+ */
+
+struct policy {
+ struct policy *next, *prev;
+
+ struct policy_handle pol_hnd;
+
+ void *data_ptr;
+};
+
+struct handle_list {
+ struct policy *Policy; /* List of policies. */
+ size_t count; /* Current number of handles. */
+ size_t pipe_ref_count; /* Number of pipe handles referring to this list. */
+};
+
/* This is the max handles across all instances of a pipe name. */
#ifndef MAX_OPEN_POLS
#define MAX_OPEN_POLS 1024
|| ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id));
}
+size_t num_pipe_handles(struct handle_list *list)
+{
+ if (list == NULL) {
+ return 0;
+ }
+ return list->count;
+}
+
/****************************************************************************
Initialise a policy handle list on a pipe. Handle list is shared between all
pipes of the same name.
new_printer->access_granted = access_granted;
- DEBUG(5, ("%d printer handles active\n", (int)p->pipe_handles->count ));
+ DEBUG(5, ("%d printer handles active\n",
+ (int)num_pipe_handles(p->pipe_handles)));
return true;
}
for (plist = get_first_internal_pipe(); plist;
plist = get_next_internal_pipe(plist)) {
- if (plist->pipe_handles && plist->pipe_handles->count) {
+ if (num_pipe_handles(plist->pipe_handles) != 0) {
return False;
}
}