mirror of
https://github.com/samba-team/samba.git
synced 2025-03-23 06:50:21 +03:00
unix_msg: Fix unix_msg_test_drain
poll_funcs_init_tevent does not register a tevent context by default. This used to be the case in an early development stage, but apparently I haven't tested this for a while :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Dec 4 18:55:08 CET 2014 on sn-devel-104
This commit is contained in:
parent
c261072a31
commit
46431e390f
@ -18,6 +18,7 @@ static void recv_cb(struct unix_msg_ctx *ctx,
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
struct poll_funcs *funcs;
|
||||
void *handle;
|
||||
struct sockaddr_un addr;
|
||||
struct unix_msg_ctx *ctx;
|
||||
struct tevent_context *ev;
|
||||
@ -45,6 +46,12 @@ int main(int argc, const char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
handle = poll_funcs_tevent_register(ev, funcs, ev);
|
||||
if (handle == NULL) {
|
||||
fprintf(stderr, "poll_funcs_tevent_register failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ret = unix_msg_init(&addr, funcs, 256, 1, recv_cb, &state, &ctx);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "unix_msg_init failed: %s\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user