-use GPLv3+ consistently
[oweals/gnunet.git] / src / fs / fs_dirmetascan.c
index 8755acf714cf0b1c75b8b41b0662a67ca9785a53..b26ef1ce0fd95d98fedeb45d2c26c40a9e8ebd0b 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -102,7 +102,7 @@ GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds)
 {
   /* terminate helper */
   if (NULL != ds->helper)
-    GNUNET_HELPER_stop (ds->helper);
+    GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
   
   /* free resources */
   if (NULL != ds->toplevel)
@@ -234,7 +234,7 @@ finish_scan (void *cls,
   ds->stop_task = GNUNET_SCHEDULER_NO_TASK;
   if (NULL != ds->helper)
   {
-    GNUNET_HELPER_stop (ds->helper);
+    GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
     ds->helper = NULL;
   }
   ds->progress_callback (ds->progress_callback_cls, 
@@ -428,6 +428,8 @@ helper_died_cb (void *cls)
   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);