diff options
Diffstat (limited to 'src/gnunet_chat_handle.c')
-rw-r--r-- | src/gnunet_chat_handle.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gnunet_chat_handle.c b/src/gnunet_chat_handle.c index b676cc9..92b4fbe 100644 --- a/src/gnunet_chat_handle.c +++ b/src/gnunet_chat_handle.c | |||
@@ -38,6 +38,9 @@ handle_create_from_config (const struct GNUNET_CONFIGURATION_Handle* cfg, | |||
38 | struct GNUNET_CHAT_Handle* handle = GNUNET_new(struct GNUNET_CHAT_Handle); | 38 | struct GNUNET_CHAT_Handle* handle = GNUNET_new(struct GNUNET_CHAT_Handle); |
39 | 39 | ||
40 | handle->cfg = cfg; | 40 | handle->cfg = cfg; |
41 | handle->shutdown_hook = GNUNET_SCHEDULER_add_shutdown( | ||
42 | on_handle_shutdown, handle | ||
43 | ); | ||
41 | 44 | ||
42 | if ((directory) && | 45 | if ((directory) && |
43 | (GNUNET_YES == GNUNET_DISK_directory_test(directory, GNUNET_YES))) | 46 | (GNUNET_YES == GNUNET_DISK_directory_test(directory, GNUNET_YES))) |
@@ -120,6 +123,9 @@ handle_destroy (struct GNUNET_CHAT_Handle* handle) | |||
120 | (handle->contexts) && | 123 | (handle->contexts) && |
121 | (handle->files)); | 124 | (handle->files)); |
122 | 125 | ||
126 | if (handle->shutdown_hook) | ||
127 | GNUNET_SCHEDULER_cancel(handle->shutdown_hook); | ||
128 | |||
123 | if (handle->public_key) | 129 | if (handle->public_key) |
124 | GNUNET_free(handle->public_key); | 130 | GNUNET_free(handle->public_key); |
125 | 131 | ||