summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_ncacn_np.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-07-21 09:53:10 -0400
committerAndreas Schneider <asn@cryptomilk.org>2011-07-21 18:40:23 +0200
commit759a04e58a88b400dbf0cafc2b86ab58ea196433 (patch)
treec3bb8258da0bf6c7c6366c56c890e3d5a995d2d6 /source3/rpc_server/rpc_ncacn_np.c
parent0d8f65b346592d98f4edbc1fa3905688c9677326 (diff)
downloadsamba-759a04e58a88b400dbf0cafc2b86ab58ea196433.tar.gz
samba-759a04e58a88b400dbf0cafc2b86ab58ea196433.tar.bz2
samba-759a04e58a88b400dbf0cafc2b86ab58ea196433.zip
s3-rpc_server: Move pipe/handles functions
Put InternalPipes related functions in rpc_handles.c and out of rpc_ncacn_np.c rpc_handles.c is the only file that really uses them after all and ncacn_np.c is the wrong place for that stuff. While ther remove unnecessary wrapper functions now that the InternalPipes static variable is directly accessible. Also move all pipes_struct related header stuff in its own rpc_pipes.h header. Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpc_server/rpc_ncacn_np.c')
-rw-r--r--source3/rpc_server/rpc_ncacn_np.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c
index d4f3833366..dea079f3f5 100644
--- a/source3/rpc_server/rpc_ncacn_np.c
+++ b/source3/rpc_server/rpc_ncacn_np.c
@@ -39,83 +39,6 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
-static struct pipes_struct *InternalPipes;
-
-/* TODO
- * the following prototypes are declared here to avoid
- * code being moved about too much for a patch to be
- * disrupted / less obvious.
- *
- * these functions, and associated functions that they
- * call, should be moved behind a .so module-loading
- * system _anyway_. so that's the next step...
- */
-
-/****************************************************************************
- Internal Pipe iterator functions.
-****************************************************************************/
-
-struct pipes_struct *get_first_internal_pipe(void)
-{
- return InternalPipes;
-}
-
-struct pipes_struct *get_next_internal_pipe(struct pipes_struct *p)
-{
- return p->next;
-}
-
-static void free_pipe_rpc_context_internal( PIPE_RPC_FNS *list )
-{
- PIPE_RPC_FNS *tmp = list;
- PIPE_RPC_FNS *tmp2;
-
- while (tmp) {
- tmp2 = tmp->next;
- SAFE_FREE(tmp);
- tmp = tmp2;
- }
-
- return;
-}
-
-bool check_open_pipes(void)
-{
- struct pipes_struct *p;
-
- for (p = InternalPipes; p != NULL; p = p->next) {
- if (num_pipe_handles(p) != 0) {
- return true;
- }
- }
- return false;
-}
-
-/****************************************************************************
- Close an rpc pipe.
-****************************************************************************/
-
-int close_internal_rpc_pipe_hnd(struct pipes_struct *p)
-{
- if (!p) {
- DEBUG(0,("Invalid pipe in close_internal_rpc_pipe_hnd\n"));
- return False;
- }
-
- TALLOC_FREE(p->auth.auth_ctx);
-
- /* Free the handles database. */
- close_policy_by_pipe(p);
-
- free_pipe_rpc_context_internal( p->contexts );
-
- DLIST_REMOVE(InternalPipes, p);
-
- ZERO_STRUCTP(p);
-
- return 0;
-}
-
/****************************************************************************
Make an internal namedpipes structure
****************************************************************************/