diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-09 14:29:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-09 14:29:34 +0000 |
commit | 8595e122088dd3f3b02d0a1625a5cc403e770f96 (patch) | |
tree | 7c37e9c6362bed76fe994e82e1b3b1535d7b6486 /src/conversation/gnunet-conversation-gtk_get_label.c | |
parent | 766c8bc9f71de9549894beabbd61848f15c053d0 (diff) | |
download | gnunet-gtk-8595e122088dd3f3b02d0a1625a5cc403e770f96.tar.gz gnunet-gtk-8595e122088dd3f3b02d0a1625a5cc403e770f96.zip |
make namestore API less brittle/sublte to use
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk_get_label.c')
-rw-r--r-- | src/conversation/gnunet-conversation-gtk_get_label.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_get_label.c b/src/conversation/gnunet-conversation-gtk_get_label.c index 949975c0..5bdf83d3 100644 --- a/src/conversation/gnunet-conversation-gtk_get_label.c +++ b/src/conversation/gnunet-conversation-gtk_get_label.c | |||
@@ -45,6 +45,17 @@ static char *target; | |||
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Called on error communicating with the namestore. | ||
49 | */ | ||
50 | static void | ||
51 | handle_error (void *cls) | ||
52 | { | ||
53 | qe = NULL; | ||
54 | GCG_log (_("Error communicating with namestore!\n")); | ||
55 | } | ||
56 | |||
57 | |||
58 | /** | ||
48 | * Process a record that was stored in the namestore. | 59 | * Process a record that was stored in the namestore. |
49 | * | 60 | * |
50 | * @param cls closure, NULL | 61 | * @param cls closure, NULL |
@@ -123,6 +134,8 @@ gnunet_conversation_gtk_enter_label_entry_changed_cb (GtkEditable *editable, | |||
123 | qe = GNUNET_NAMESTORE_records_lookup (GCG_IMPORT_get_namestore (), | 134 | qe = GNUNET_NAMESTORE_records_lookup (GCG_IMPORT_get_namestore (), |
124 | pkey, | 135 | pkey, |
125 | label, | 136 | label, |
137 | &handle_error, | ||
138 | builder, | ||
126 | &handle_existing_records, | 139 | &handle_existing_records, |
127 | builder); | 140 | builder); |
128 | } | 141 | } |