diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-30 09:05:24 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-30 09:05:24 +0900 |
commit | 3116c1819b35604d0c27f46b0e76be9952a86dc7 (patch) | |
tree | c04a7e74564b769a5e1f88a41d0eb31dd9fd6268 | |
parent | 107ceaa92d8368c6e147f520d780a580e279184d (diff) | |
download | gnunet-gtk-3116c1819b35604d0c27f46b0e76be9952a86dc7.tar.gz gnunet-gtk-3116c1819b35604d0c27f46b0e76be9952a86dc7.zip |
fit ftbfs
-rw-r--r-- | src/conversation/gnunet-conversation-gtk_import.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 24 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk.h | 2 | ||||
-rw-r--r-- | src/fs/gnunet-fs-gtk_main-window-search.c | 2 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore-gtk.c | 10 |
5 files changed, 26 insertions, 14 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_import.c b/src/conversation/gnunet-conversation-gtk_import.c index 9602ff7d..18ab0aeb 100644 --- a/src/conversation/gnunet-conversation-gtk_import.c +++ b/src/conversation/gnunet-conversation-gtk_import.c | |||
@@ -151,7 +151,7 @@ GSC_add_contact (const gchar *name, const gchar *address) | |||
151 | { | 151 | { |
152 | type = GNUNET_GNSRECORD_TYPE_PKEY; | 152 | type = GNUNET_GNSRECORD_TYPE_PKEY; |
153 | value = &rvalue; | 153 | value = &rvalue; |
154 | value_size = GNUNET_IDENTITY_key_get_length (&rvalue); | 154 | value_size = GNUNET_IDENTITY_public_key_get_length (&rvalue); |
155 | } | 155 | } |
156 | else | 156 | else |
157 | { | 157 | { |
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c index c30f4a29..a1230c03 100644 --- a/src/fs/gnunet-fs-gtk.c +++ b/src/fs/gnunet-fs-gtk.c | |||
@@ -279,7 +279,7 @@ shutdown_task (void *cls) | |||
279 | } | 279 | } |
280 | if (NULL != main_context.id_op) | 280 | if (NULL != main_context.id_op) |
281 | { | 281 | { |
282 | GNUNET_IDENTITY_cancel (main_context.id_op); | 282 | GNUNET_IDENTITY_ego_lookup_cancel (main_context.id_op); |
283 | main_context.id_op = NULL; | 283 | main_context.id_op = NULL; |
284 | } | 284 | } |
285 | if (NULL != main_context.identity) | 285 | if (NULL != main_context.identity) |
@@ -647,9 +647,7 @@ monitor_zone_records (void *cls, | |||
647 | */ | 647 | */ |
648 | static void | 648 | static void |
649 | handle_sks_zone_identity (void *cls, | 649 | handle_sks_zone_identity (void *cls, |
650 | struct GNUNET_IDENTITY_Ego *ego, | 650 | struct GNUNET_IDENTITY_Ego *ego) |
651 | void **ctx, | ||
652 | const char *name) | ||
653 | { | 651 | { |
654 | main_context.id_op = NULL; | 652 | main_context.id_op = NULL; |
655 | 653 | ||
@@ -722,6 +720,7 @@ run (void *cls) | |||
722 | unsigned long long window_width; | 720 | unsigned long long window_width; |
723 | unsigned long long window_height; | 721 | unsigned long long window_height; |
724 | int maximized; | 722 | int maximized; |
723 | char *default_ego_name; | ||
725 | 724 | ||
726 | ml = cls; | 725 | ml = cls; |
727 | /* setup main context */ | 726 | /* setup main context */ |
@@ -857,7 +856,17 @@ run (void *cls) | |||
857 | "MAX_PARALLEL_REQUESTS", | 856 | "MAX_PARALLEL_REQUESTS", |
858 | &req_parallel)) | 857 | &req_parallel)) |
859 | req_parallel = DEFAULT_MAX_PARALLEL_REQUESTS; | 858 | req_parallel = DEFAULT_MAX_PARALLEL_REQUESTS; |
860 | 859 | if (GNUNET_OK != | |
860 | GNUNET_CONFIGURATION_get_value_string (main_context.cfg, | ||
861 | "fs-sks", | ||
862 | "DEFAULT_IDENTITY", | ||
863 | &default_ego_name)) | ||
864 | { | ||
865 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
866 | "Please set DEFAULT_IDENTITY under [fs-sks]\n"); | ||
867 | GNUNET_GTK_main_loop_quit (cls); | ||
868 | return; | ||
869 | } | ||
861 | /* initialize file-sharing */ | 870 | /* initialize file-sharing */ |
862 | fs = GNUNET_FS_start (main_context.cfg, | 871 | fs = GNUNET_FS_start (main_context.cfg, |
863 | "gnunet-fs-gtk", | 872 | "gnunet-fs-gtk", |
@@ -883,10 +892,11 @@ run (void *cls) | |||
883 | main_context.gns = GNUNET_GNS_connect (main_context.cfg); | 892 | main_context.gns = GNUNET_GNS_connect (main_context.cfg); |
884 | main_context.identity = | 893 | main_context.identity = |
885 | GNUNET_IDENTITY_connect (main_context.cfg, &non_null_cb, NULL); | 894 | GNUNET_IDENTITY_connect (main_context.cfg, &non_null_cb, NULL); |
886 | main_context.id_op = GNUNET_IDENTITY_get (main_context.identity, | 895 | main_context.id_op = GNUNET_IDENTITY_ego_lookup (main_context.cfg, |
887 | "fs-sks", | 896 | default_ego_name, |
888 | &handle_sks_zone_identity, | 897 | &handle_sks_zone_identity, |
889 | NULL); | 898 | NULL); |
899 | GNUNET_free (default_ego_name); | ||
890 | #if HAVE_LIBUNIQUE | 900 | #if HAVE_LIBUNIQUE |
891 | unique_app_watch_window (unique_app, GTK_WINDOW (main_context.main_window)); | 901 | unique_app_watch_window (unique_app, GTK_WINDOW (main_context.main_window)); |
892 | g_signal_connect (unique_app, | 902 | g_signal_connect (unique_app, |
diff --git a/src/fs/gnunet-fs-gtk.h b/src/fs/gnunet-fs-gtk.h index a14f81b9..5fb46ddf 100644 --- a/src/fs/gnunet-fs-gtk.h +++ b/src/fs/gnunet-fs-gtk.h | |||
@@ -248,7 +248,7 @@ struct GNUNET_GTK_MainWindowContext | |||
248 | /** | 248 | /** |
249 | * Operation we use to determine namespace resolution domain. | 249 | * Operation we use to determine namespace resolution domain. |
250 | */ | 250 | */ |
251 | struct GNUNET_IDENTITY_Operation *id_op; | 251 | struct GNUNET_IDENTITY_EgoLookup *id_op; |
252 | 252 | ||
253 | /** | 253 | /** |
254 | * Our zone for SKS operations. Can be NULL. | 254 | * Our zone for SKS operations. Can be NULL. |
diff --git a/src/fs/gnunet-fs-gtk_main-window-search.c b/src/fs/gnunet-fs-gtk_main-window-search.c index fed27001..ad688601 100644 --- a/src/fs/gnunet-fs-gtk_main-window-search.c +++ b/src/fs/gnunet-fs-gtk_main-window-search.c | |||
@@ -407,7 +407,7 @@ save_pseudonym_with_nick (struct PseuLookupContext *lctx, const char *nick) | |||
407 | /* show the window */ | 407 | /* show the window */ |
408 | gtk_window_present (GTK_WINDOW (lctx->progress_dialog)); | 408 | gtk_window_present (GTK_WINDOW (lctx->progress_dialog)); |
409 | memset (&rd, 0, sizeof (rd)); | 409 | memset (&rd, 0, sizeof (rd)); |
410 | rd.data_size = GNUNET_IDENTITY_key_get_length (&lctx->pkey); | 410 | rd.data_size = GNUNET_IDENTITY_public_key_get_length (&lctx->pkey); |
411 | rd.data = &lctx->pkey; | 411 | rd.data = &lctx->pkey; |
412 | rd.flags = GNUNET_GNSRECORD_RF_PRIVATE; | 412 | rd.flags = GNUNET_GNSRECORD_RF_PRIVATE; |
413 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 413 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
diff --git a/src/namestore/gnunet-namestore-gtk.c b/src/namestore/gnunet-namestore-gtk.c index 025aa9c5..a9d42f91 100644 --- a/src/namestore/gnunet-namestore-gtk.c +++ b/src/namestore/gnunet-namestore-gtk.c | |||
@@ -2706,7 +2706,7 @@ fresh_label (const char *label) | |||
2706 | static void | 2706 | static void |
2707 | iop_create_cont (void *cls, | 2707 | iop_create_cont (void *cls, |
2708 | const struct GNUNET_IDENTITY_PrivateKey *priv, | 2708 | const struct GNUNET_IDENTITY_PrivateKey *priv, |
2709 | const char *emsg) | 2709 | enum GNUNET_ErrorCode ec) |
2710 | { | 2710 | { |
2711 | GtkEntry *entry; | 2711 | GtkEntry *entry; |
2712 | 2712 | ||
@@ -2715,7 +2715,8 @@ iop_create_cont (void *cls, | |||
2715 | iop = NULL; | 2715 | iop = NULL; |
2716 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_zone_entry")); | 2716 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_zone_entry")); |
2717 | gtk_widget_set_sensitive (main_window, TRUE); | 2717 | gtk_widget_set_sensitive (main_window, TRUE); |
2718 | gtk_label_set_markup (status_label, emsg); | 2718 | gtk_label_set_markup (status_label, (GNUNET_EC_NONE == ec) ? NULL : |
2719 | GNUNET_ErrorCode_get_hint (ec)); | ||
2719 | gtk_entry_grab_focus_without_selecting (entry); | 2720 | gtk_entry_grab_focus_without_selecting (entry); |
2720 | } | 2721 | } |
2721 | 2722 | ||
@@ -2728,14 +2729,15 @@ iop_create_cont (void *cls, | |||
2728 | * @param emsg error message, used in status bar | 2729 | * @param emsg error message, used in status bar |
2729 | */ | 2730 | */ |
2730 | static void | 2731 | static void |
2731 | iop_cont (void *cls, const char *emsg) | 2732 | iop_cont (void *cls, enum GNUNET_ErrorCode ec) |
2732 | { | 2733 | { |
2733 | GtkEntry *entry; | 2734 | GtkEntry *entry; |
2734 | 2735 | ||
2735 | iop = NULL; | 2736 | iop = NULL; |
2736 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_zone_entry")); | 2737 | entry = GTK_ENTRY (get_object ("gnunet_namestore_gtk_zone_entry")); |
2737 | gtk_widget_set_sensitive (main_window, TRUE); | 2738 | gtk_widget_set_sensitive (main_window, TRUE); |
2738 | gtk_label_set_markup (status_label, emsg); | 2739 | gtk_label_set_markup (status_label, (GNUNET_EC_NONE == ec) ? NULL : |
2740 | GNUNET_ErrorCode_get_hint (ec)); | ||
2739 | gtk_entry_grab_focus_without_selecting (entry); | 2741 | gtk_entry_grab_focus_without_selecting (entry); |
2740 | } | 2742 | } |
2741 | 2743 | ||