{
/* terminate helper */
if (NULL != ds->helper)
- GNUNET_HELPER_stop (ds->helper);
+ GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
/* free resources */
if (NULL != ds->toplevel)
struct GNUNET_FS_DirScanner *ds = cls;
ds->stop_task = GNUNET_SCHEDULER_NO_TASK;
- GNUNET_HELPER_stop (ds->helper);
- ds->helper = NULL;
+ if (NULL != ds->helper)
+ {
+ GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
+ ds->helper = NULL;
+ }
ds->progress_callback (ds->progress_callback_cls,
NULL, GNUNET_SYSERR,
GNUNET_FS_DIRSCANNER_FINISHED);
struct GNUNET_FS_DirScanner *ds = cls;
ds->helper = NULL;
+ if (GNUNET_SCHEDULER_NO_TASK != ds->stop_task)
+ return; /* normal death, was finished */
ds->progress_callback (ds->progress_callback_cls,
NULL, GNUNET_SYSERR,
GNUNET_FS_DIRSCANNER_INTERNAL_ERROR);