aboutsummaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk_handle-add-provider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anastasis/anastasis-gtk_handle-add-provider.c')
-rw-r--r--src/anastasis/anastasis-gtk_handle-add-provider.c24
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,
&acfg->liability_limit),
GNUNET_JSON_pack_string ("business_name",
acfg->business_name),
+ GNUNET_JSON_pack_string ("status",
+ "enabled"),
+ GNUNET_JSON_pack_uint64 ("http_status",
+ MHD_HTTP_OK),
GNUNET_JSON_pack_uint64 ("storage_limit_in_megabytes",
acfg->storage_limit_in_megabytes),
GNUNET_JSON_pack_data_auto ("provider_salt",
@@ -181,6 +185,7 @@ add_provider_dialog_response_cb (GtkDialog *dialog,
GtkBuilder *builder = GTK_BUILDER (user_data);
GtkEntry *entry;
const char *url;
+ json_t *ap;
if (NULL != co)
{
@@ -195,16 +200,31 @@ add_provider_dialog_response_cb (GtkDialog *dialog,
pstate = NULL;
return;
}
+ if (NULL == pstate)
+ {
+ GNUNET_break (0);
+ return;
+ }
+ ap = json_object_get (AG_redux_state,
+ "authentication_providers");
+ if (NULL == ap)
+ {
+ GNUNET_break (0);
+ return;
+ }
entry = GTK_ENTRY (gtk_builder_get_object (builder,
"url_entry"));
url = gtk_entry_get_text (entry);
ANASTASIS_policy_discovery_more (AG_pd,
url,
pstate);
+ GNUNET_break (0 ==
+ json_object_set_new (ap,
+ url,
+ pstate));
+ pstate = NULL;
gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (G_OBJECT (builder));
- json_decref (pstate);
- pstate = NULL;
}