aboutsummaryrefslogtreecommitdiff
path: root/src/chat/messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat/messenger.c')
-rw-r--r--src/chat/messenger.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/chat/messenger.c b/src/chat/messenger.c
index 23ab01e..6455760 100644
--- a/src/chat/messenger.c
+++ b/src/chat/messenger.c
@@ -27,23 +27,6 @@
27#include "../event.h" 27#include "../event.h"
28#include <gnunet/gnunet_chat_lib.h> 28#include <gnunet/gnunet_chat_lib.h>
29 29
30static void
31_chat_messenger_idle(void *cls)
32{
33 g_assert(cls);
34
35 MESSENGER_Application *app = (MESSENGER_Application*) cls;
36
37 // Idling until the application shuts down
38 // (required to get events immediately).
39 app->chat.messenger.idle = GNUNET_SCHEDULER_add_delayed_with_priority(
40 GNUNET_TIME_relative_get_second_(),
41 GNUNET_SCHEDULER_PRIORITY_IDLE,
42 &_chat_messenger_idle,
43 app
44 );
45}
46
47static int 30static int
48_chat_messenger_message(void *cls, 31_chat_messenger_message(void *cls,
49 struct GNUNET_CHAT_Context *context, 32 struct GNUNET_CHAT_Context *context,
@@ -227,17 +210,9 @@ chat_messenger_run(void *cls,
227 210
228 schedule_load_gnunet(&(app->chat.schedule)); 211 schedule_load_gnunet(&(app->chat.schedule));
229 212
230 // Start libgnunetchat handle
231 app->chat.messenger.handle = GNUNET_CHAT_start( 213 app->chat.messenger.handle = GNUNET_CHAT_start(
232 cfg, 214 cfg,
233 &_chat_messenger_message, 215 &_chat_messenger_message,
234 app 216 app
235 ); 217 );
236
237 // The idle callback seems to be necessary to not wait too long for
238 // other events
239 app->chat.messenger.idle = GNUNET_SCHEDULER_add_now(
240 &_chat_messenger_idle,
241 app
242 );
243} 218}