diff options
Diffstat (limited to 'source3/lib/unix_msg/test_source.c')
-rw-r--r-- | source3/lib/unix_msg/test_source.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/lib/unix_msg/test_source.c b/source3/lib/unix_msg/test_source.c index bfafee1fd33..94984d88523 100644 --- a/source3/lib/unix_msg/test_source.c +++ b/source3/lib/unix_msg/test_source.c @@ -5,7 +5,8 @@ int main(int argc, const char *argv[]) { - struct poll_funcs funcs; + struct poll_funcs *funcs; + void *tevent_handle; struct unix_msg_ctx **ctxs; struct tevent_context *ev; struct iovec iov; @@ -26,7 +27,16 @@ int main(int argc, const char *argv[]) perror("tevent_context_init failed"); return 1; } - poll_funcs_init_tevent(&funcs, ev); + funcs = poll_funcs_init_tevent(NULL); + if (funcs == NULL) { + fprintf(stderr, "poll_funcs_init_tevent failed\n"); + return 1; + } + tevent_handle = poll_funcs_tevent_register(NULL, funcs, ev); + if (tevent_handle == NULL) { + fprintf(stderr, "poll_funcs_tevent_register failed\n"); + return 1; + } ctxs = talloc_array(ev, struct unix_msg_ctx *, num_ctxs); if (ctxs == NULL) { @@ -35,7 +45,7 @@ int main(int argc, const char *argv[]) } for (i=0; i<num_ctxs; i++) { - ret = unix_msg_init(NULL, &funcs, 256, 1, NULL, NULL, + ret = unix_msg_init(NULL, funcs, 256, 1, NULL, NULL, &ctxs[i]); if (ret != 0) { fprintf(stderr, "unix_msg_init failed: %s\n", |