summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2017-03-28 21:55:47 +1300
committerStefan Metzmacher <metze@samba.org>2017-04-26 03:09:19 +0200
commit2f1cc560dc6937d0fd7ce485ea091b979d98e53b (patch)
tree159810760263dd5d42d537ec6f6f4a698efd1e25 /source4/lib/messaging
parentcd033ae583c52ec0d9cd7bdb387cc4558f9930e0 (diff)
downloadsamba-2f1cc560dc6937d0fd7ce485ea091b979d98e53b.tar.gz
s4-messaging: Add helpful comments
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Apr 26 03:09:19 CEST 2017 on sn-devel-144
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/messaging.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 2da0acc0c7a..b8d4e50f12c 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -391,6 +391,10 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
tdb_flags |= lpcfg_tdb_flags(lp_ctx, 0);
+ /*
+ * This context holds a destructor that cleans up any names
+ * registered on this context on talloc_free()
+ */
msg->names = server_id_db_init(msg, server_id, lock_dir, 0, tdb_flags);
if (msg->names == NULL) {
goto fail;
@@ -767,6 +771,9 @@ static int irpc_destructor(struct irpc_request *irpc)
/*
add a string name that this irpc server can be called on
+
+ It will be removed from the DB either via irpc_remove_name or on
+ talloc_free(msg_ctx->names).
*/
NTSTATUS irpc_add_name(struct imessaging_context *msg_ctx, const char *name)
{