diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-29 16:04:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:48:56 -0500 |
commit | 87fd7b5484b10ccdece6152f2a2a9adb4ea5fc78 (patch) | |
tree | d51e9094115a4717e6c29f0c95c112fd588756d3 /source4/librpc/rpc | |
parent | 1690ae449a6189d38a1d63dba22bf0ec774201f8 (diff) | |
download | samba-87fd7b5484b10ccdece6152f2a2a9adb4ea5fc78.tar.gz samba-87fd7b5484b10ccdece6152f2a2a9adb4ea5fc78.tar.bz2 samba-87fd7b5484b10ccdece6152f2a2a9adb4ea5fc78.zip |
r12574: Bring tables.pl back to life and move registration of interfaces
now completely to a new subsystem.
(This used to be commit bbacfaaea5819e0ecadf81e8fbb424916284c809)
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 26 | ||||
-rw-r--r-- | source4/librpc/rpc/table.c | 28 |
2 files changed, 27 insertions, 27 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index e9c479a9cd..37f7d82ef5 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -32,32 +32,6 @@ static void dcerpc_ship_next_request(struct dcerpc_connection *c); -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; -} - /* destroy a dcerpc connection */ static int dcerpc_connection_destructor(void *ptr) { diff --git a/source4/librpc/rpc/table.c b/source4/librpc/rpc/table.c index 5450edb003..9b5cf8ff80 100644 --- a/source4/librpc/rpc/table.c +++ b/source4/librpc/rpc/table.c @@ -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 */ |