aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-21 15:23:49 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-21 15:23:49 +0200
commite28112c7c4c6c3f3c0fd129fcf2d2b4ef271d01f (patch)
tree2505ef6fc1d28957d70c72545444f1b443dd173c
parentcc0b652c48f0d903652cd2426d87a7955117be9c (diff)
downloadanastasis-gtk-e28112c7c4c6c3f3c0fd129fcf2d2b4ef271d01f.tar.gz
anastasis-gtk-e28112c7c4c6c3f3c0fd129fcf2d2b4ef271d01f.tar.bz2
anastasis-gtk-e28112c7c4c6c3f3c0fd129fcf2d2b4ef271d01f.zip
-fix add-provider crash
-rw-r--r--contrib/anastasis_gtk_add_provider.glade18
-rw-r--r--debian/changelog2
-rw-r--r--src/anastasis/anastasis-gtk_handle-add-provider.c24
3 files changed, 23 insertions, 21 deletions
diff --git a/contrib/anastasis_gtk_add_provider.glade b/contrib/anastasis_gtk_add_provider.glade
index 67797a6..54cf062 100644
--- a/contrib/anastasis_gtk_add_provider.glade
+++ b/contrib/anastasis_gtk_add_provider.glade
@@ -140,24 +140,6 @@ Author: Christian Grothoff
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="add_button">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can-focus">False</property>
- <property name="can-default">True</property>
- <property name="has-default">True</property>
- <property name="receives-default">True</property>
- <property name="use-stock">True</property>
- <signal name="clicked" handler="url_add_button_clicked_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/debian/changelog b/debian/changelog
index 295d9ea..0da600b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-anastasis-gtk (0.2.99-2) unstable; urgency=low
+anastasis-gtk (0.2.99-3) unstable; urgency=low
* Close to Anastasis 0.3.0, but testing package details.
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;
}