diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-10 01:08:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:19:29 -0500 |
commit | c6881d1e650fd284a366af76f5a214a5de05cc0c (patch) | |
tree | b41216f1b76579b9f0d455825bc8b55ff549e8d7 | |
parent | 001dc40ecd76bb7ea0e3d2a043bab42c9ba7c780 (diff) | |
download | samba-c6881d1e650fd284a366af76f5a214a5de05cc0c.tar.gz samba-c6881d1e650fd284a366af76f5a214a5de05cc0c.tar.xz samba-c6881d1e650fd284a366af76f5a214a5de05cc0c.zip |
r8272: added the hooks for adding a name to a messaging context, so we will
be able to send a message to the "ldap_server" task without having to
know its task ID.
(This used to be commit 8f69867867857e0c9a9246c2dec9612ccc234724)
-rw-r--r-- | source4/cldap_server/cldap_server.c | 3 | ||||
-rw-r--r-- | source4/ldap_server/ldap_server.c | 3 | ||||
-rw-r--r-- | source4/lib/messaging/irpc.h | 1 | ||||
-rw-r--r-- | source4/lib/messaging/messaging.c | 10 | ||||
-rw-r--r-- | source4/nbt_server/nbt_server.c | 2 | ||||
-rw-r--r-- | source4/smb_server/smb_server.c | 3 |
6 files changed, 22 insertions, 0 deletions
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c index 62b6f590202..31b59ebbe9c 100644 --- a/source4/cldap_server/cldap_server.c +++ b/source4/cldap_server/cldap_server.c @@ -24,6 +24,7 @@ #include "libcli/ldap/ldap.h" #include "lib/events/events.h" #include "lib/socket/socket.h" +#include "lib/messaging/irpc.h" #include "smbd/service_task.h" #include "cldap_server/cldap_server.h" @@ -139,6 +140,8 @@ static void cldapd_task_init(struct task_server *task) task_server_terminate(task, "cldapd failed to setup interfaces"); return; } + + irpc_add_name(task->msg_ctx, "cldap_server"); } diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 9c0e883e363..c898471e27b 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -32,6 +32,7 @@ #include "smbd/service_stream.h" #include "lib/socket/socket.h" #include "lib/tls/tls.h" +#include "lib/messaging/irpc.h" /* close the socket and shutdown a server_context @@ -358,6 +359,8 @@ static void ldapsrv_accept(struct stream_connection *c) c->event.fde, NULL, port != 389); if (conn->tls == NULL) goto failed; + irpc_add_name(c->msg_ctx, "ldap_server"); + return; failed: diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h index cba17a2c971..0482e9a9579 100644 --- a/source4/lib/messaging/irpc.h +++ b/source4/lib/messaging/irpc.h @@ -86,6 +86,7 @@ void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void NTSTATUS irpc_register(struct messaging_context *msg_ctx, const struct dcerpc_interface_table *table, int call, irpc_function_t fn, void *private); +NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name); struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx, uint32_t server_id, const struct dcerpc_interface_table *table, diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 7cf488c7d00..9bf5071e906 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -690,3 +690,13 @@ NTSTATUS irpc_call(struct messaging_context *msg_ctx, table, callnum, r); return irpc_call_recv(irpc); } + +/* + add a string name that this irpc server can be called on +*/ +NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name) +{ + return NT_STATUS_OK; +} + + diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c index 19707a234f8..21196109881 100644 --- a/source4/nbt_server/nbt_server.c +++ b/source4/nbt_server/nbt_server.c @@ -93,6 +93,8 @@ static void nbtd_task_init(struct task_server *task) /* start the process of registering our names on all interfaces */ nbtd_register_names(nbtsrv); + + irpc_add_name(task->msg_ctx, "nbt_server"); } diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 550234e1da3..539627f3612 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -26,6 +26,7 @@ #include "dlinklist.h" #include "smbd/service_stream.h" #include "smb_server/smb_server.h" +#include "lib/messaging/irpc.h" /* @@ -771,6 +772,8 @@ static void smbsrv_accept(struct stream_connection *conn) smb_conn->processing = False; conn->private = smb_conn; + + irpc_add_name(conn->msg_ctx, "smb_server"); } |