From 27129573ff5b87ac8b107d267cde87b516d9e6b9 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Oct 2004 21:57:30 +0000 Subject: r3125: Store object UUID directly instead of using a pointer (struct dcerpc_binding) Let test fail if messaging_init() fails instead of generating segfault in the LOCAL-MESSAGING test (This used to be commit 0609f410ef756501d50c04b544387ae547fcd63c) --- source4/torture/local/messaging.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/torture/local/messaging.c') diff --git a/source4/torture/local/messaging.c b/source4/torture/local/messaging.c index 6177bc82a8..38cebb4d39 100644 --- a/source4/torture/local/messaging.c +++ b/source4/torture/local/messaging.c @@ -61,6 +61,11 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx) if (fork() == 0) { void *msg_ctx2 = messaging_init(mem_ctx, 1, ev); + + if (!msg_ctx2) { + exit(1); + } + messaging_register(msg_ctx2, NULL, MY_PING, ping_message); messaging_register(msg_ctx2, mem_ctx, MY_EXIT, exit_message); event_loop_wait(ev); @@ -71,6 +76,11 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx) msg_ctx = messaging_init(mem_ctx, 2, ev); + if (!msg_ctx) { + printf("messaging_init() failed\n"); + return False; + } + messaging_register(msg_ctx, &pong_count, MY_PONG, pong_message); start_timer(); -- cgit