aboutsummaryrefslogtreecommitdiff
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
commit64730192bb58359defd8a49c0554c731a4a06e29 (patch)
tree5b9c943477c5a8ec4fac9763505d8199758863d8
parent483dad09de03a771f78cdaa77ba0bb5b327f8be7 (diff)
downloadgnunet-gtk-64730192bb58359defd8a49c0554c731a4a06e29.tar.gz
gnunet-gtk-64730192bb58359defd8a49c0554c731a4a06e29.zip
fixing #3799: only unindex if DB operations succeeded previously in the first place, and when unindexing do proper shutdown handling
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index 4d5ea6a3..bfb8645a 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -4047,18 +4047,30 @@ GNUNET_GTK_fs_event_handler (void *cls,
4047 GNUNET_FS_GTK_unindex_handle_stop_ (info->value.unindex.cctx); 4047 GNUNET_FS_GTK_unindex_handle_stop_ (info->value.unindex.cctx);
4048 return NULL; 4048 return NULL;
4049 case GNUNET_FS_STATUS_UNINDEX_PROGRESS: 4049 case GNUNET_FS_STATUS_UNINDEX_PROGRESS:
4050 GNUNET_FS_GTK_unindex_handle_progress_ (info->value.unindex.cctx, 4050 /* info->value.unindex.cctx is NULL if the unindexing was
4051 info->value.unindex.completed); 4051 triggered by a *failed* publishing operation; in this case
4052 we don't do anything in the GUI but just clean up when
4053 the operation is complete (or fails) */
4054 if (NULL != info->value.unindex.cctx)
4055 GNUNET_FS_GTK_unindex_handle_progress_ (info->value.unindex.cctx,
4056 info->value.unindex.completed);
4052 return info->value.unindex.cctx; 4057 return info->value.unindex.cctx;
4053 case GNUNET_FS_STATUS_UNINDEX_ERROR: 4058 case GNUNET_FS_STATUS_UNINDEX_ERROR:
4054 GNUNET_FS_GTK_unindex_handle_error_ (info->value.unindex.cctx, 4059 if (NULL != info->value.unindex.cctx)
4055 info->value.unindex.specifics.error.message); 4060 GNUNET_FS_GTK_unindex_handle_error_ (info->value.unindex.cctx,
4061 info->value.unindex.specifics.error.message);
4062 else
4063 GNUNET_FS_unindex_stop (info->value.unindex.uc);
4056 return info->value.unindex.cctx; 4064 return info->value.unindex.cctx;
4057 case GNUNET_FS_STATUS_UNINDEX_COMPLETED: 4065 case GNUNET_FS_STATUS_UNINDEX_COMPLETED:
4058 GNUNET_FS_GTK_unindex_handle_completed_ (info->value.unindex.cctx); 4066 if (NULL != info->value.unindex.cctx)
4067 GNUNET_FS_GTK_unindex_handle_completed_ (info->value.unindex.cctx);
4068 else
4069 GNUNET_FS_unindex_stop (info->value.unindex.uc);
4059 return info->value.unindex.cctx; 4070 return info->value.unindex.cctx;
4060 case GNUNET_FS_STATUS_UNINDEX_STOPPED: 4071 case GNUNET_FS_STATUS_UNINDEX_STOPPED:
4061 GNUNET_FS_GTK_unindex_handle_stop_ (info->value.unindex.cctx); 4072 if (NULL != info->value.unindex.cctx)
4073 GNUNET_FS_GTK_unindex_handle_stop_ (info->value.unindex.cctx);
4062 return NULL; 4074 return NULL;
4063 default: 4075 default:
4064 GNUNET_break (0); 4076 GNUNET_break (0);