aboutsummaryrefslogtreecommitdiff
path: root/src/gnunet_chat_lib_intern.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnunet_chat_lib_intern.c')
-rw-r--r--src/gnunet_chat_lib_intern.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c
index c581e6e..90d35db 100644
--- a/src/gnunet_chat_lib_intern.c
+++ b/src/gnunet_chat_lib_intern.c
@@ -71,13 +71,31 @@ task_handle_destruction (void *cls)
71} 71}
72 72
73void 73void
74task_handle_connection (void *cls)
75{
76 GNUNET_assert(cls);
77
78 struct GNUNET_CHAT_Handle *handle = (struct GNUNET_CHAT_Handle*) cls;
79
80 handle->connection = NULL;
81
82 if (! handle->next)
83 return;
84
85 const struct GNUNET_CHAT_Account *account = handle->next;
86 handle->next = NULL;
87
88 handle_connect(handle, account);
89}
90
91void
74task_handle_disconnection (void *cls) 92task_handle_disconnection (void *cls)
75{ 93{
76 GNUNET_assert(cls); 94 GNUNET_assert(cls);
77 95
78 struct GNUNET_CHAT_Handle *handle = (struct GNUNET_CHAT_Handle*) cls; 96 struct GNUNET_CHAT_Handle *handle = (struct GNUNET_CHAT_Handle*) cls;
79 97
80 handle->disconnection = NULL; 98 handle->connection = NULL;
81 handle_disconnect(handle); 99 handle_disconnect(handle);
82 100
83 if (! handle->next) 101 if (! handle->next)