diff options
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-add-provider.c')
-rw-r--r-- | src/anastasis/anastasis-gtk_handle-add-provider.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/anastasis/anastasis-gtk_handle-add-provider.c b/src/anastasis/anastasis-gtk_handle-add-provider.c index d75e77b..74cc09d 100644 --- a/src/anastasis/anastasis-gtk_handle-add-provider.c +++ b/src/anastasis/anastasis-gtk_handle-add-provider.c | |||
@@ -109,6 +109,10 @@ config_cb (void *cls, | |||
109 | &acfg->liability_limit), | 109 | &acfg->liability_limit), |
110 | GNUNET_JSON_pack_string ("business_name", | 110 | GNUNET_JSON_pack_string ("business_name", |
111 | acfg->business_name), | 111 | acfg->business_name), |
112 | GNUNET_JSON_pack_string ("status", | ||
113 | "enabled"), | ||
114 | GNUNET_JSON_pack_uint64 ("http_status", | ||
115 | MHD_HTTP_OK), | ||
112 | GNUNET_JSON_pack_uint64 ("storage_limit_in_megabytes", | 116 | GNUNET_JSON_pack_uint64 ("storage_limit_in_megabytes", |
113 | acfg->storage_limit_in_megabytes), | 117 | acfg->storage_limit_in_megabytes), |
114 | GNUNET_JSON_pack_data_auto ("provider_salt", | 118 | GNUNET_JSON_pack_data_auto ("provider_salt", |
@@ -181,6 +185,7 @@ add_provider_dialog_response_cb (GtkDialog *dialog, | |||
181 | GtkBuilder *builder = GTK_BUILDER (user_data); | 185 | GtkBuilder *builder = GTK_BUILDER (user_data); |
182 | GtkEntry *entry; | 186 | GtkEntry *entry; |
183 | const char *url; | 187 | const char *url; |
188 | json_t *ap; | ||
184 | 189 | ||
185 | if (NULL != co) | 190 | if (NULL != co) |
186 | { | 191 | { |
@@ -195,16 +200,31 @@ add_provider_dialog_response_cb (GtkDialog *dialog, | |||
195 | pstate = NULL; | 200 | pstate = NULL; |
196 | return; | 201 | return; |
197 | } | 202 | } |
203 | if (NULL == pstate) | ||
204 | { | ||
205 | GNUNET_break (0); | ||
206 | return; | ||
207 | } | ||
208 | ap = json_object_get (AG_redux_state, | ||
209 | "authentication_providers"); | ||
210 | if (NULL == ap) | ||
211 | { | ||
212 | GNUNET_break (0); | ||
213 | return; | ||
214 | } | ||
198 | entry = GTK_ENTRY (gtk_builder_get_object (builder, | 215 | entry = GTK_ENTRY (gtk_builder_get_object (builder, |
199 | "url_entry")); | 216 | "url_entry")); |
200 | url = gtk_entry_get_text (entry); | 217 | url = gtk_entry_get_text (entry); |
201 | ANASTASIS_policy_discovery_more (AG_pd, | 218 | ANASTASIS_policy_discovery_more (AG_pd, |
202 | url, | 219 | url, |
203 | pstate); | 220 | pstate); |
221 | GNUNET_break (0 == | ||
222 | json_object_set_new (ap, | ||
223 | url, | ||
224 | pstate)); | ||
225 | pstate = NULL; | ||
204 | gtk_widget_destroy (GTK_WIDGET (dialog)); | 226 | gtk_widget_destroy (GTK_WIDGET (dialog)); |
205 | g_object_unref (G_OBJECT (builder)); | 227 | g_object_unref (G_OBJECT (builder)); |
206 | json_decref (pstate); | ||
207 | pstate = NULL; | ||
208 | } | 228 | } |
209 | 229 | ||
210 | 230 | ||