diff options
Diffstat (limited to 'src/gnunet_chat_handle.c')
-rw-r--r-- | src/gnunet_chat_handle.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/gnunet_chat_handle.c b/src/gnunet_chat_handle.c index cbbbcc7..b9b1d3e 100644 --- a/src/gnunet_chat_handle.c +++ b/src/gnunet_chat_handle.c | |||
@@ -168,39 +168,32 @@ handle_destroy (struct GNUNET_CHAT_Handle *handle) | |||
168 | GNUNET_NAMESTORE_disconnect(handle->namestore); | 168 | GNUNET_NAMESTORE_disconnect(handle->namestore); |
169 | 169 | ||
170 | struct GNUNET_CHAT_InternalAccounts *accounts; | 170 | struct GNUNET_CHAT_InternalAccounts *accounts; |
171 | accounts = handle->accounts_head; | ||
172 | |||
173 | while (accounts) | ||
174 | { | ||
175 | if (accounts->op) | ||
176 | GNUNET_IDENTITY_cancel(accounts->op); | ||
177 | |||
178 | accounts->op = NULL; | ||
179 | accounts = accounts->next; | ||
180 | } | ||
181 | |||
182 | if (handle->identity) | ||
183 | GNUNET_IDENTITY_disconnect(handle->identity); | ||
184 | |||
185 | if (handle->arm) | ||
186 | GNUNET_ARM_disconnect(handle->arm); | ||
187 | 171 | ||
188 | while (handle->accounts_head) | 172 | while (handle->accounts_head) |
189 | { | 173 | { |
190 | accounts = handle->accounts_head; | 174 | accounts = handle->accounts_head; |
191 | 175 | ||
176 | if (accounts->op) | ||
177 | GNUNET_IDENTITY_cancel(accounts->op); | ||
178 | |||
192 | if (accounts->account) | 179 | if (accounts->account) |
193 | account_destroy(accounts->account); | 180 | account_destroy(accounts->account); |
194 | 181 | ||
195 | GNUNET_CONTAINER_DLL_remove( | 182 | GNUNET_CONTAINER_DLL_remove( |
196 | handle->accounts_head, | 183 | handle->accounts_head, |
197 | handle->accounts_tail, | 184 | handle->accounts_tail, |
198 | accounts | 185 | accounts |
199 | ); | 186 | ); |
200 | 187 | ||
201 | GNUNET_free(accounts); | 188 | GNUNET_free(accounts); |
202 | } | 189 | } |
203 | 190 | ||
191 | if (handle->identity) | ||
192 | GNUNET_IDENTITY_disconnect(handle->identity); | ||
193 | |||
194 | if (handle->arm) | ||
195 | GNUNET_ARM_disconnect(handle->arm); | ||
196 | |||
204 | if (handle->directory) | 197 | if (handle->directory) |
205 | GNUNET_free(handle->directory); | 198 | GNUNET_free(handle->directory); |
206 | 199 | ||