libgnunetchat

library for GNUnet Messenger
Log | Files | Refs | README | LICENSE

commit b7b74260781b203595ca77c6911ea3f72fecf1e5
parent 2c0dd8a4a717bb779faa65202c3b8001d684c685
Author: Jacki <jacki@thejackimonster.de>
Date:   Fri, 28 Jun 2024 23:52:13 +0200

Cleanup scheduler calls to add tasks

Signed-off-by: Jacki <jacki@thejackimonster.de>

Diffstat:
Msrc/gnunet_chat_handle_intern.c | 6+++---
Msrc/gnunet_chat_lib_intern.c | 7++-----
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/gnunet_chat_handle_intern.c b/src/gnunet_chat_handle_intern.c @@ -371,8 +371,7 @@ send_refresh: if (handle->refresh) return; - handle->refresh = GNUNET_SCHEDULER_add_at_with_priority( - GNUNET_TIME_absolute_get(), + handle->refresh = GNUNET_SCHEDULER_add_with_priority( GNUNET_SCHEDULER_PRIORITY_IDLE, on_handle_refresh, handle @@ -678,7 +677,8 @@ it_context_iterate_dependencies(void *cls, if ((message) && (!message->task)) message->task = GNUNET_SCHEDULER_add_now( - on_handle_message_callback, message); + on_handle_message_callback, message + ); return GNUNET_YES; } diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c @@ -53,11 +53,8 @@ task_handle_destruction (void *cls) if (accounts) { - handle->destruction = GNUNET_SCHEDULER_add_at_with_priority( - GNUNET_TIME_absolute_add( - GNUNET_TIME_absolute_get(), - GNUNET_TIME_relative_get_millisecond_() - ), + handle->destruction = GNUNET_SCHEDULER_add_delayed_with_priority( + GNUNET_TIME_relative_get_millisecond_(), GNUNET_SCHEDULER_PRIORITY_IDLE, task_handle_destruction, handle