diff options
Diffstat (limited to 'source4/torture/local')
-rw-r--r-- | source4/torture/local/messaging.c | 10 |
1 files changed, 10 insertions, 0 deletions
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(); |