aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-05-27 20:37:37 +0000
committerChristian Grothoff <christian@grothoff.org>2014-05-27 20:37:37 +0000
commitf62d6e818767693e64917d3f6b80380711701d10 (patch)
tree56ed1feeb48c4412b665c751ed78c1dc8dd907b2
parentc4713eba4b5d087f6773a8354d285619c9b4a500 (diff)
downloadgnunet-gtk-f62d6e818767693e64917d3f6b80380711701d10.tar.gz
gnunet-gtk-f62d6e818767693e64917d3f6b80380711701d10.zip
fix build with nat api changes
-rw-r--r--src/conversation/gnunet-conversation-gtk_contacts.c10
-rw-r--r--src/setup/gnunet-setup-transport.c27
2 files changed, 22 insertions, 15 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_contacts.c b/src/conversation/gnunet-conversation-gtk_contacts.c
index 057ed40d..0b3023d3 100644
--- a/src/conversation/gnunet-conversation-gtk_contacts.c
+++ b/src/conversation/gnunet-conversation-gtk_contacts.c
@@ -265,17 +265,19 @@ gnunet_conversation_gtk_contacts_zone_combobox_changed_cb (GtkComboBox *widget,
265void 265void
266GCG_CONTACTS_init () 266GCG_CONTACTS_init ()
267{ 267{
268#if GTK_CHECK_VERSION(3,10,0)
268 GtkTreeView *contacts_treeview; 269 GtkTreeView *contacts_treeview;
269 270
271 contacts_treeview
272 = GTK_TREE_VIEW (GCG_get_main_window_object ("gnunet_conversation_gtk_treeview"));
273 gtk_tree_view_set_activate_on_single_click (contacts_treeview,
274 TRUE);
275#endif
270 contacts_liststore 276 contacts_liststore
271 = GTK_LIST_STORE (GCG_get_main_window_object 277 = GTK_LIST_STORE (GCG_get_main_window_object
272 ("gnunet_conversation_gtk_contacts_liststore")); 278 ("gnunet_conversation_gtk_contacts_liststore"));
273 contacts_treemodel 279 contacts_treemodel
274 = GTK_TREE_MODEL (contacts_liststore); 280 = GTK_TREE_MODEL (contacts_liststore);
275 contacts_treeview
276 = GTK_TREE_VIEW (GCG_get_main_window_object ("gnunet_conversation_gtk_treeview"));
277 gtk_tree_view_set_activate_on_single_click (contacts_treeview,
278 TRUE);
279} 281}
280 282
281 283
diff --git a/src/setup/gnunet-setup-transport.c b/src/setup/gnunet-setup-transport.c
index 6064410c..445f680b 100644
--- a/src/setup/gnunet-setup-transport.c
+++ b/src/setup/gnunet-setup-transport.c
@@ -166,12 +166,11 @@ update_icmp_server_enable_button (int on)
166 * Clean up and update GUI (with success). 166 * Clean up and update GUI (with success).
167 * 167 *
168 * @param cls closure (unused) 168 * @param cls closure (unused)
169 * @param success currently always #GNUNET_OK 169 * @param result error status
170 * @param emsg error message, NULL on success
171 */ 170 */
172static void 171static void
173result_callback (void *cls, int success, 172result_callback (void *cls,
174 const char *emsg) 173 enum GNUNET_NAT_FailureCode result)
175{ 174{
176 struct GNUNET_SetupAutoContext *ac = cls; 175 struct GNUNET_SetupAutoContext *ac = cls;
177 176
@@ -180,13 +179,16 @@ result_callback (void *cls, int success,
180 GNUNET_NAT_test_stop (ac->tst); 179 GNUNET_NAT_test_stop (ac->tst);
181 ac->tst = NULL; 180 ac->tst = NULL;
182 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 181 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
183 success 182 (GNUNET_NAT_ERROR_SUCCESS == result)
184 ? _("NAT traversal with ICMP Server succeeded.\n") 183 ? _("NAT traversal with ICMP Server succeeded.\n")
185 : _("NAT traversal with ICMP Server failed.\n")); 184 : _("NAT traversal with ICMP Server failed.\n"));
186 update_icmp_server_enable_button (success); 185 update_icmp_server_enable_button ((GNUNET_NAT_ERROR_SUCCESS == result));
187 if (NULL != cfg) 186 if (NULL != cfg)
188 GNUNET_CONFIGURATION_set_value_string (cfg, "nat", "ENABLE_ICMP_SERVER", 187 GNUNET_CONFIGURATION_set_value_string (cfg,
189 success ? "YES": "NO"); 188 "nat",
189 "ENABLE_ICMP_SERVER",
190 (GNUNET_NAT_ERROR_SUCCESS == result)
191 ? "YES": "NO");
190 next_phase (ac); 192 next_phase (ac);
191} 193}
192 194
@@ -233,7 +235,10 @@ reversal_test (void *cls,
233 _("Testing connection reversal with ICMP server.\n")); 235 _("Testing connection reversal with ICMP server.\n"));
234 GNUNET_assert (NULL != cfg); 236 GNUNET_assert (NULL != cfg);
235 GNUNET_RESOLVER_connect (cfg); 237 GNUNET_RESOLVER_connect (cfg);
236 ac->tst = GNUNET_NAT_test_start (cfg, GNUNET_YES, 0, 0, &result_callback, ac); 238 ac->tst = GNUNET_NAT_test_start (cfg,
239 GNUNET_YES,
240 0, 0,
241 &result_callback, ac);
237 if (NULL == ac->tst) 242 if (NULL == ac->tst)
238 { 243 {
239 next_phase (ac); 244 next_phase (ac);
@@ -261,12 +266,12 @@ test_online (struct GNUNET_SetupAutoContext *ac)
261 * 266 *
262 * @param cls closure with our setup context 267 * @param cls closure with our setup context
263 * @param addr the address, NULL on errors 268 * @param addr the address, NULL on errors
264 * @param emsg error message, NULL on success 269 * @param result error code
265 */ 270 */
266static void 271static void
267set_external_ipv4 (void *cls, 272set_external_ipv4 (void *cls,
268 const struct in_addr *addr, 273 const struct in_addr *addr,
269 const char *emsg) 274 enum GNUNET_NAT_FailureCode result)
270{ 275{
271 struct GNUNET_SetupAutoContext *ac = cls; 276 struct GNUNET_SetupAutoContext *ac = cls;
272 char buf[INET_ADDRSTRLEN]; 277 char buf[INET_ADDRSTRLEN];