diff options
author | Pavel Filipenský <pfilipen@redhat.com> | 2022-03-23 14:50:57 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2022-04-11 16:56:35 +0000 |
commit | dfbb381839e9ea179cb53791606d6be08ebac806 (patch) | |
tree | 63086d69145a06f6c8fd7e8131b4893b6a0f9010 /lib/tevent | |
parent | ddc8f4f4d84ca40274463a40e5c16f0542337499 (diff) | |
download | samba-dfbb381839e9ea179cb53791606d6be08ebac806.tar.gz |
tevent: Use internally an empty trigger function for blocker requests
This avoids special magic, but keeps the same external behavior.
It makes the following changes easier to understand.
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'lib/tevent')
-rw-r--r-- | lib/tevent/tevent_queue.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c index 070329b878c..ad68643c69f 100644 --- a/lib/tevent/tevent_queue.c +++ b/lib/tevent/tevent_queue.c @@ -149,6 +149,12 @@ static void tevent_queue_immediate_trigger(struct tevent_context *ev, q->list->trigger(q->list->req, q->list->private_data); } +static void tevent_queue_noop_trigger(struct tevent_req *req, + void *_private_data) +{ + /* this is doing nothing but blocking the queue */ +} + static struct tevent_queue_entry *tevent_queue_add_internal( struct tevent_queue *queue, struct tevent_context *ev, @@ -168,7 +174,7 @@ static struct tevent_queue_entry *tevent_queue_add_internal( * if there is no trigger, it is just a blocker */ if (trigger == NULL) { - e->triggered = true; + trigger = tevent_queue_noop_trigger; } e->queue = queue; |