summaryrefslogtreecommitdiff
path: root/source4/torture/local
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-21 21:57:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:23 -0500
commit27129573ff5b87ac8b107d267cde87b516d9e6b9 (patch)
treedb84db6b5e2c7aa986af63b31985d7c5b56c082d /source4/torture/local
parent77b691e670b6372f74451f1cf87ccf8a6d7804e2 (diff)
downloadsamba-27129573ff5b87ac8b107d267cde87b516d9e6b9.tar.gz
samba-27129573ff5b87ac8b107d267cde87b516d9e6b9.tar.bz2
samba-27129573ff5b87ac8b107d267cde87b516d9e6b9.zip
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)
Diffstat (limited to 'source4/torture/local')
-rw-r--r--source4/torture/local/messaging.c10
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();