1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-05 12:23:50 +03:00

r12574: Bring tables.pl back to life and move registration of interfaces

now completely to a new subsystem.
This commit is contained in:
Jelmer Vernooij
2005-12-29 16:04:34 +00:00
committed by Gerald (Jerry) Carter
parent 33012dc015
commit bbacfaaea5
6 changed files with 140 additions and 106 deletions

View File

@@ -22,6 +22,33 @@
*/
#include "includes.h"
#include "dlinklist.h"
struct dcerpc_interface_list *dcerpc_pipes = NULL;
/*
register a dcerpc client interface
*/
NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interface)
{
struct dcerpc_interface_list *l;
for (l = dcerpc_pipes; l; l = l->next) {
if (GUID_equal(&interface->uuid, &l->table->uuid)) {
DEBUG(0, ("Attempt to register interface %s which has the "
"same UUID as already registered interface %s\n",
interface->name, l->table->name));
return NT_STATUS_OBJECT_NAME_COLLISION;
}
}
l = talloc(talloc_autofree_context(), struct dcerpc_interface_list);
l->table = interface;
DLIST_ADD(dcerpc_pipes, l);
return NT_STATUS_OK;
}
/*
find the pipe name for a local IDL interface
@@ -82,7 +109,6 @@ const struct dcerpc_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
return NULL;
}
extern struct dcerpc_interface_list *dcerpc_pipes;
/*
return the list of registered dcerpc_pipes
*/