From: Christian Grothoff Date: Sun, 29 Jan 2012 21:26:46 +0000 (+0000) Subject: -fix shutdown issues on error X-Git-Tag: initial-import-from-subversion-38251~15017 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c8875d69a74ceadbe7eb54a3b35d7d2fcdec907;p=oweals%2Fgnunet.git -fix shutdown issues on error --- diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c index 69c7770db..35e95c00b 100644 --- a/src/fs/fs_dirmetascan.c +++ b/src/fs/fs_dirmetascan.c @@ -100,7 +100,7 @@ GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds) /* free resources */ if (NULL != ds->toplevel) GNUNET_FS_share_tree_free (ds->toplevel); - GNUNET_free (ds->ex_arg); + GNUNET_free_non_null (ds->ex_arg); GNUNET_free (ds->filename_expanded); GNUNET_free (ds); } @@ -300,6 +300,10 @@ process_helper_msgs (void *cls, if (0 != strcmp (filename, ds->pos->filename)) { + fprintf (stderr, + "Expected `%s', got `%s'\n", + ds->pos->filename, + filename); GNUNET_break (0); break; } diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 9cc55a290..a0fd96829 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c @@ -345,6 +345,9 @@ uri_ksk_continuation (void *cls, const struct GNUNET_FS_Uri *ksk_uri, } +/** + * FIXME: docu + */ static struct GNUNET_FS_FileInformation * get_file_information (struct GNUNET_FS_ShareTreeItem *item) { @@ -385,6 +388,9 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item) } +/** + * FIXME: docu + */ static void directory_trim_complete () { @@ -481,6 +487,11 @@ directory_scan_cb (void *cls, if (namespace != NULL) GNUNET_FS_namespace_delete (namespace, GNUNET_NO); GNUNET_FS_stop (ctx); + if (kill_task != GNUNET_SCHEDULER_NO_TASK) + { + GNUNET_SCHEDULER_cancel (kill_task); + kill_task = GNUNET_SCHEDULER_NO_TASK; + } ret = 1; break; default: