diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-01-10 10:52:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:37:23 -0500 |
commit | 1cd4339b9a2786aa26691ca4f02fa93ab0958b88 (patch) | |
tree | 9b09324617e38a651de0a761b3c591fa7deff74a /source4/torture/local/irpc.c | |
parent | 848e236516ccc15864f7c3d2e05a905f6a81678e (diff) | |
download | samba-1cd4339b9a2786aa26691ca4f02fa93ab0958b88.tar.gz samba-1cd4339b9a2786aa26691ca4f02fa93ab0958b88.tar.bz2 samba-1cd4339b9a2786aa26691ca4f02fa93ab0958b88.zip |
r20646: first preparations for cluster enablement. This changes "
uint32_t server_id
to
struct server_id server_id;
which allows a server ID to have an node number. The node number will
be zero in non-clustered case. This is the most basic hook needed for
clustering, and ctdb.
(This used to be commit 2365abaa991d57d68c6ebe9be608e01c907102eb)
Diffstat (limited to 'source4/torture/local/irpc.c')
-rw-r--r-- | source4/torture/local/irpc.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c index 185e1fb4ae..299cf77625 100644 --- a/source4/torture/local/irpc.c +++ b/source4/torture/local/irpc.c @@ -92,7 +92,8 @@ static bool test_addone(struct torture_context *test, const void *_data, r.in.in_data = value; test_debug = True; - status = IRPC_CALL(data->msg_ctx1, MSG_ID2, rpcecho, ECHO_ADDONE, &r, test); + status = IRPC_CALL(data->msg_ctx1, cluster_id(MSG_ID2), + rpcecho, ECHO_ADDONE, &r, test); test_debug = False; torture_assert_ntstatus_ok(test, status, "AddOne failed"); @@ -120,8 +121,9 @@ static bool test_echodata(struct torture_context *tctx, r.in.in_data = (unsigned char *)talloc_strdup(mem_ctx, "0123456789"); r.in.len = strlen((char *)r.in.in_data); - status = IRPC_CALL(data->msg_ctx1, MSG_ID2, rpcecho, ECHO_ECHODATA, &r, - mem_ctx); + status = IRPC_CALL(data->msg_ctx1, cluster_id(MSG_ID2), + rpcecho, ECHO_ECHODATA, &r, + mem_ctx); torture_assert_ntstatus_ok(tctx, status, "EchoData failed"); /* check the answer */ @@ -177,8 +179,9 @@ static bool test_speed(struct torture_context *tctx, while (timeval_elapsed(&tv) < timelimit) { struct irpc_request *irpc; - irpc = IRPC_CALL_SEND(data->msg_ctx1, MSG_ID2, rpcecho, ECHO_ADDONE, - &r, mem_ctx); + irpc = IRPC_CALL_SEND(data->msg_ctx1, cluster_id(MSG_ID2), + rpcecho, ECHO_ADDONE, + &r, mem_ctx); torture_assert(tctx, irpc != NULL, "AddOne send failed"); irpc->async.fn = irpc_callback; @@ -214,11 +217,15 @@ static BOOL irpc_setup(struct torture_context *tctx, void **_data) lp_set_cmdline("lock dir", "lockdir.tmp"); data->ev = event_context_init(tctx); - torture_assert(tctx, data->msg_ctx1 = messaging_init(tctx, MSG_ID1, data->ev), - "Failed to init first messaging context"); - - torture_assert(tctx, data->msg_ctx2 = messaging_init(tctx, MSG_ID2, data->ev), - "Failed to init second messaging context"); + torture_assert(tctx, data->msg_ctx1 = + messaging_init(tctx, + cluster_id(MSG_ID1), data->ev), + "Failed to init first messaging context"); + + torture_assert(tctx, data->msg_ctx2 = + messaging_init(tctx, + cluster_id(MSG_ID2), data->ev), + "Failed to init second messaging context"); /* register the server side function */ IRPC_REGISTER(data->msg_ctx1, rpcecho, ECHO_ADDONE, irpc_AddOne, NULL); |