1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00

ctdb-tests: Test stub fixes

Initialise ctdb->ev in ctdb_cmdline_client_stub().

Add a comment to tevent_context_init_stub() explaining why the ctdb
context is initialised there instead of ctdb_cmdline_client_stub().
This information is in the git log but that doesn't help someone who
is reading the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2015-02-08 08:14:41 +11:00 committed by Amitay Isaacs
parent 65c3c5730c
commit e1b4cd19a5

View File

@ -367,6 +367,8 @@ struct ctdb_context *ctdb_cmdline_client_stub(struct tevent_context *ev,
DEBUGLEVEL = 0;
}
ctdb_global->ev = ev;
return ctdb_global;
}
@ -374,6 +376,8 @@ struct tevent_context *tevent_context_init_stub(TALLOC_CTX *mem_ctx)
{
struct ctdb_context *ctdb;
/* This needs to be initialised prior to the client setup, for
the xpnn stub */
ctdb = talloc_zero(NULL, struct ctdb_context);
ctdb_set_socketname(ctdb, "fake");