diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-29 21:41:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-29 21:41:24 +0000 |
commit | 6756773dbc5aee6135ba8067cbf67aaf48cbfaf6 (patch) | |
tree | 9dd6bfb42ed814653a2e622923332db54b007a7d /src/fs/fs_dirmetascan.c | |
parent | 68401426269d202ae48d4942842f365198886c57 (diff) | |
download | gnunet-6756773dbc5aee6135ba8067cbf67aaf48cbfaf6.tar.gz gnunet-6756773dbc5aee6135ba8067cbf67aaf48cbfaf6.zip |
-fs publish should basically work now
Diffstat (limited to 'src/fs/fs_dirmetascan.c')
-rw-r--r-- | src/fs/fs_dirmetascan.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c index 35e95c00b..5ffa69229 100644 --- a/src/fs/fs_dirmetascan.c +++ b/src/fs/fs_dirmetascan.c | |||
@@ -95,8 +95,9 @@ void | |||
95 | GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds) | 95 | GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds) |
96 | { | 96 | { |
97 | /* terminate helper */ | 97 | /* terminate helper */ |
98 | GNUNET_HELPER_stop (ds->helper); | 98 | if (NULL != ds->helper) |
99 | 99 | GNUNET_HELPER_stop (ds->helper); | |
100 | |||
100 | /* free resources */ | 101 | /* free resources */ |
101 | if (NULL != ds->toplevel) | 102 | if (NULL != ds->toplevel) |
102 | GNUNET_FS_share_tree_free (ds->toplevel); | 103 | GNUNET_FS_share_tree_free (ds->toplevel); |
@@ -190,6 +191,7 @@ expand_tree (struct GNUNET_FS_ShareTreeItem *parent, | |||
190 | chld = GNUNET_malloc (sizeof (struct GNUNET_FS_ShareTreeItem)); | 191 | chld = GNUNET_malloc (sizeof (struct GNUNET_FS_ShareTreeItem)); |
191 | chld->parent = parent; | 192 | chld->parent = parent; |
192 | chld->filename = GNUNET_strdup (filename); | 193 | chld->filename = GNUNET_strdup (filename); |
194 | chld->short_filename = GNUNET_strdup (GNUNET_STRINGS_get_short_name (filename)); | ||
193 | chld->is_directory = is_directory; | 195 | chld->is_directory = is_directory; |
194 | if (NULL != parent) | 196 | if (NULL != parent) |
195 | GNUNET_CONTAINER_DLL_insert (parent->children_head, | 197 | GNUNET_CONTAINER_DLL_insert (parent->children_head, |
@@ -300,10 +302,6 @@ process_helper_msgs (void *cls, | |||
300 | if (0 != strcmp (filename, | 302 | if (0 != strcmp (filename, |
301 | ds->pos->filename)) | 303 | ds->pos->filename)) |
302 | { | 304 | { |
303 | fprintf (stderr, | ||
304 | "Expected `%s', got `%s'\n", | ||
305 | ds->pos->filename, | ||
306 | filename); | ||
307 | GNUNET_break (0); | 305 | GNUNET_break (0); |
308 | break; | 306 | break; |
309 | } | 307 | } |
@@ -319,7 +317,6 @@ process_helper_msgs (void *cls, | |||
319 | break; | 317 | break; |
320 | } | 318 | } |
321 | /* having full filenames is too dangerous; always make sure we clean them up */ | 319 | /* having full filenames is too dangerous; always make sure we clean them up */ |
322 | ds->pos->short_filename = GNUNET_strdup (GNUNET_STRINGS_get_short_name (filename)); | ||
323 | GNUNET_CONTAINER_meta_data_delete (ds->pos->meta, | 320 | GNUNET_CONTAINER_meta_data_delete (ds->pos->meta, |
324 | EXTRACTOR_METATYPE_FILENAME, | 321 | EXTRACTOR_METATYPE_FILENAME, |
325 | NULL, 0); | 322 | NULL, 0); |
@@ -343,10 +340,11 @@ process_helper_msgs (void *cls, | |||
343 | GNUNET_break (0); | 340 | GNUNET_break (0); |
344 | break; | 341 | break; |
345 | } | 342 | } |
343 | GNUNET_HELPER_stop (ds->helper); | ||
344 | ds->helper = NULL; | ||
346 | ds->progress_callback (ds->progress_callback_cls, | 345 | ds->progress_callback (ds->progress_callback_cls, |
347 | NULL, GNUNET_SYSERR, | 346 | NULL, GNUNET_SYSERR, |
348 | GNUNET_FS_DIRSCANNER_INTERNAL_ERROR); | 347 | GNUNET_FS_DIRSCANNER_FINISHED); |
349 | |||
350 | return; | 348 | return; |
351 | default: | 349 | default: |
352 | GNUNET_break (0); | 350 | GNUNET_break (0); |