aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-publish.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-29 13:06:33 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-29 13:06:33 +0000
commitcfd880578bd21f9adedba557291c903d325e93cd (patch)
tree3f9c7459127646523b58905e345f290867f619f6 /src/fs/gnunet-publish.c
parent3e558d2e9f22c96328d27e5cd35a5da3866e3543 (diff)
downloadgnunet-cfd880578bd21f9adedba557291c903d325e93cd.tar.gz
gnunet-cfd880578bd21f9adedba557291c903d325e93cd.zip
fixing #3799: only unindex if DB operations succeeded previously in the first place, and when unindexing do proper shutdown handling
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r--src/fs/gnunet-publish.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index 975f5d2ad..b213218e4 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -293,15 +293,29 @@ progress_cb (void *cls,
293 case GNUNET_FS_STATUS_PUBLISH_STOPPED: 293 case GNUNET_FS_STATUS_PUBLISH_STOPPED:
294 GNUNET_break (NULL == pc); 294 GNUNET_break (NULL == pc);
295 return NULL; 295 return NULL;
296 case GNUNET_FS_STATUS_UNINDEX_START:
297 FPRINTF (stderr,
298 "%s",
299 _("Starting cleanup after abort\n"));
300 return NULL;
296 case GNUNET_FS_STATUS_UNINDEX_PROGRESS: 301 case GNUNET_FS_STATUS_UNINDEX_PROGRESS:
297 return NULL; 302 return NULL;
298 case GNUNET_FS_STATUS_UNINDEX_COMPLETED: 303 case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
299 FPRINTF (stderr, 304 FPRINTF (stderr,
300 "%s", 305 "%s",
301 _("Cleanup after abort complete.\n")); 306 _("Cleanup after abort completed.\n"));
307 GNUNET_FS_unindex_stop (info->value.unindex.uc);
308 return NULL;
309 case GNUNET_FS_STATUS_UNINDEX_ERROR:
310 FPRINTF (stderr,
311 "%s",
312 _("Cleanup after abort failed.\n"));
313 GNUNET_FS_unindex_stop (info->value.unindex.uc);
302 return NULL; 314 return NULL;
303 default: 315 default:
304 FPRINTF (stderr, _("Unexpected status: %d\n"), info->status); 316 FPRINTF (stderr,
317 _("Unexpected status: %d\n"),
318 info->status);
305 return NULL; 319 return NULL;
306 } 320 }
307 return ""; /* non-null */ 321 return ""; /* non-null */
@@ -316,7 +330,7 @@ progress_cb (void *cls,
316 * @param plugin_name name of the plugin that generated the meta data 330 * @param plugin_name name of the plugin that generated the meta data
317 * @param type type of the meta data 331 * @param type type of the meta data
318 * @param format format of data 332 * @param format format of data
319 * @param data_mime_type mime type of data 333 * @param data_mime_type mime type of @a data
320 * @param data value of the meta data 334 * @param data value of the meta data
321 * @param data_size number of bytes in @a data 335 * @param data_size number of bytes in @a data
322 * @return always 0 336 * @return always 0