diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c b/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c index d5382391..38a98a31 100644 --- a/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c +++ b/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c | |||
@@ -79,8 +79,7 @@ struct NamespaceAdvertisementContext | |||
79 | struct GNUNET_FS_Namespace *ns; | 79 | struct GNUNET_FS_Namespace *ns; |
80 | int do_index; | 80 | int do_index; |
81 | const char *short_fn; | 81 | const char *short_fn; |
82 | guint anonymity_level; | 82 | struct GNUNET_FS_BlockOptions bo; |
83 | guint priority; | ||
84 | const char *root; | 83 | const char *root; |
85 | struct GNUNET_FS_FileInformation *fip; | 84 | struct GNUNET_FS_FileInformation *fip; |
86 | }; | 85 | }; |
@@ -119,7 +118,7 @@ advertise_namespace (void *cls, struct GNUNET_FS_FileInformation *fi, | |||
119 | static void | 118 | static void |
120 | adv_pseudonym_edit_publish_dialog_cb (gpointer cls, int do_index, | 119 | adv_pseudonym_edit_publish_dialog_cb (gpointer cls, int do_index, |
121 | const char *short_fn, | 120 | const char *short_fn, |
122 | guint anonymity_level, guint priority, | 121 | const struct GNUNET_FS_BlockOptions *bo, |
123 | const char *root, gint ret) | 122 | const char *root, gint ret) |
124 | { | 123 | { |
125 | struct NamespaceAdvertisementContext *nds = cls; | 124 | struct NamespaceAdvertisementContext *nds = cls; |
@@ -128,8 +127,7 @@ adv_pseudonym_edit_publish_dialog_cb (gpointer cls, int do_index, | |||
128 | { | 127 | { |
129 | nds->do_index = do_index; | 128 | nds->do_index = do_index; |
130 | nds->short_fn = short_fn; | 129 | nds->short_fn = short_fn; |
131 | nds->anonymity_level = anonymity_level; | 130 | nds->bo = *bo; |
132 | nds->priority = priority; | ||
133 | nds->root = root; | 131 | nds->root = root; |
134 | GNUNET_FS_file_information_inspect (nds->fip, &advertise_namespace, nds); | 132 | GNUNET_FS_file_information_inspect (nds->fip, &advertise_namespace, nds); |
135 | } | 133 | } |
@@ -154,7 +152,6 @@ GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog * dialog, | |||
154 | GtkWindow *transient; | 152 | GtkWindow *transient; |
155 | struct NamespaceAdvertisementContext *nds; | 153 | struct NamespaceAdvertisementContext *nds; |
156 | struct GNUNET_CONTAINER_MetaData *meta; | 154 | struct GNUNET_CONTAINER_MetaData *meta; |
157 | struct GNUNET_FS_BlockOptions bo; | ||
158 | 155 | ||
159 | builder = GTK_BUILDER (user_data); | 156 | builder = GTK_BUILDER (user_data); |
160 | ad = GTK_WIDGET (gtk_builder_get_object | 157 | ad = GTK_WIDGET (gtk_builder_get_object |
@@ -191,23 +188,22 @@ GNUNET_GTK_select_pseudonym_dialog_response_cb (GtkDialog * dialog, | |||
191 | nds->ns = ns; | 188 | nds->ns = ns; |
192 | nds->do_index = FALSE; | 189 | nds->do_index = FALSE; |
193 | nds->short_fn = NULL; | 190 | nds->short_fn = NULL; |
194 | nds->anonymity_level = 1; | 191 | nds->bo.anonymity_level = 1; |
195 | nds->priority = 1000; | 192 | nds->bo.content_priority = 1000; |
196 | nds->root = NULL; | 193 | nds->root = NULL; |
197 | /* This is a bogus fileinfo. It's needed because edit_publish_dialog | 194 | /* This is a bogus fileinfo. It's needed because edit_publish_dialog |
198 | * was written to work with fileinfo, and return a fileinfo. | 195 | * was written to work with fileinfo, and return a fileinfo. |
199 | */ | 196 | */ |
200 | memset (&bo, 0, sizeof (bo)); | 197 | memset (&nds->bo, 0, sizeof (struct GNUNET_FS_BlockOptions)); |
201 | bo.expiration_time = | 198 | nds->bo.expiration_time = |
202 | GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2); | 199 | GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2); |
203 | bo.anonymity_level = 1; | 200 | nds->bo.anonymity_level = 1; |
204 | nds->fip = | 201 | nds->fip = |
205 | GNUNET_FS_file_information_create_empty_directory (NULL, NULL, NULL, meta, | 202 | GNUNET_FS_file_information_create_empty_directory (NULL, NULL, NULL, meta, |
206 | &bo); | 203 | &nds->bo); |
207 | GNUNET_CONTAINER_meta_data_destroy (meta); | 204 | GNUNET_CONTAINER_meta_data_destroy (meta); |
208 | GNUNET_FS_GTK_edit_publish_dialog (builder, transient, nds->do_index, | 205 | GNUNET_FS_GTK_edit_publish_dialog (builder, transient, nds->do_index, |
209 | nds->short_fn, nds->anonymity_level, | 206 | nds->short_fn, &nds->bo, nds->fip, FALSE, |
210 | nds->priority, nds->fip, FALSE, | ||
211 | &adv_pseudonym_edit_publish_dialog_cb, | 207 | &adv_pseudonym_edit_publish_dialog_cb, |
212 | nds); | 208 | nds); |
213 | } | 209 | } |