]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tevent: allow the "standard" backend to be overloaded
authorStefan Metzmacher <metze@samba.org>
Sat, 12 Nov 2022 15:27:30 +0000 (15:27 +0000)
committerStefan Metzmacher <metze@samba.org>
Wed, 18 Jan 2023 16:26:36 +0000 (16:26 +0000)
We'll export tevent_find_ops_byname() soon and will allow
the context_init() function of backends to find that standard ops
and hand over to standard_ops->context_init().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
lib/tevent/tevent_standard.c

index 38720204e021d606184e473bac1a67e6b5cc0de3..749cad0db772acfc0804c26fe7f0aae1c3c75fdc 100644 (file)
@@ -166,7 +166,7 @@ static int std_event_context_init(struct tevent_context *ev)
         * pointers.
         */
 
-       if (ev->ops == &std_event_ops) {
+       if (ev->ops->loop_once == NULL) {
                glue = talloc_zero(ev, struct std_event_glue);
                if (glue == NULL) {
                        return -1;