summaryrefslogtreecommitdiff
path: root/source3/lib/util_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_list.c')
-rw-r--r--source3/lib/util_list.c111
1 files changed, 0 insertions, 111 deletions
diff --git a/source3/lib/util_list.c b/source3/lib/util_list.c
index 9795932eca..b6c82b7371 100644
--- a/source3/lib/util_list.c
+++ b/source3/lib/util_list.c
@@ -210,114 +210,3 @@ BOOL copy_policy_hnd (POLICY_HND *dest, const POLICY_HND *src)
*dest = *src;
return True;
}
-
-/* -------------------------------------------------------------
- Functions to implement the RpcHandle list
- -------------------------------------------------------------- */
-
-
-
-/***************************************************************
- Return True if the to RPC_HND_NODEs are equivalent in value.
- Return False if they are not. Since a POLICY_HND is really
- a UUID, two RPC_HND_NODES are considered to be the same if the
- POLICY_HND value matches.
-
- No ordering between the two is attempted.
- **************************************************************/
-BOOL compare_rpc_hnd_node(const RPC_HND_NODE *x,
- const RPC_HND_NODE *y)
-{
- /* only compare valid nodes */
- if (x==NULL || y==NULL)
- return False;
-
- /* if the POLICY_HND field(s) are ever changed, this
- will need to be updated. Probably should be a set of
- support function for dealing with POLICY_HND */
- return (memcmp(&x->hnd, &y->hnd, sizeof(POLICY_HND)) == 0);
-}
-
-/***************************************************************
- associate a POLICY_HND with a cli_connection
- **************************************************************/
-BOOL RpcHndList_set_connection(const POLICY_HND *hnd,
- struct cli_connection *con)
-{
-
- RPC_HND_NODE *node = NULL;
-
- /* initialize the list if necessary */
- if (!hnds.initialized)
- generic_list_init(&hnds);
-
- /* allocate a node to insert */
- if ((node=(RPC_HND_NODE*)malloc(sizeof(RPC_HND_NODE))) == NULL)
- {
- DEBUG(0, ("ERROR: Unable to allocate memory for an RPC_HND_NODE!\n"));
- return False;
- }
-
- /* fill in the RPC_HND_NODE */
- copy_policy_hnd (&node->hnd, hnd);
- node->cli = con;
-
- /* insert the node into the list:
- The 3rd parameter is set to 0 since we don't care
- anything about the type field */
- return (generic_list_insert(&hnds, (void*)node, 0));
-}
-
-/************************************************************************
- delete a POLICY_HND (and associated cli_connection) from the list
- ***********************************************************************/
-BOOL RpcHndList_del_connection(const POLICY_HND *hnd)
-{
- RPC_HND_NODE node, *located;
-
- /* return NULL if the list has not been initialized */
- if (!hnds.initialized)
- return False;
-
- /* fill in the RPC_HND_NODE */
- copy_policy_hnd (&node.hnd, hnd);
- node.cli = NULL;
-
- /* search for the POLICY_HND */
- located = (RPC_HND_NODE*)generic_list_remove(&hnds, &node,
- (BOOL(*)(const void*, const void*))compare_rpc_hnd_node);
- if (located == NULL)
- return False;
-
- /* delete the information */
- cli_connection_free(located->cli);
- SAFE_FREE(located);
- return True;
-}
-
-/************************************************************************
- search for a POLICY_HND and return a pointer to the associated
- cli_connection struct in the list
- **********************************************************************/
-struct cli_connection* RpcHndList_get_connection(const POLICY_HND *hnd)
-{
- RPC_HND_NODE node, *located;
-
- /* return NULL if the list has not been initialized */
- if (!hnds.initialized)
- return NULL;
-
- /* fill in the RPC_HND_NODE */
- copy_policy_hnd (&node.hnd, hnd);
- node.cli = NULL;
-
- /* search for the POLICY_HND */
- located = (RPC_HND_NODE*)generic_list_locate(&hnds, &node,
- (BOOL(*)(const void*, const void*))compare_rpc_hnd_node);
- if (located == NULL)
- return NULL;
- else
- return located->cli;
-}
-
-