aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-16 14:10:12 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-16 14:10:12 +0000
commitef3090c516dce51adfd057591685bf92a5db034d (patch)
tree19b2bde06bc45172d179d552e244014782c10bf9
parentf64ccbb35fcfa4e635a6fefc385cdc0fa79a509b (diff)
downloadgnunet-gtk-ef3090c516dce51adfd057591685bf92a5db034d.tar.gz
gnunet-gtk-ef3090c516dce51adfd057591685bf92a5db034d.zip
-use 32-bit for bandwidth values, Gtk hates us otherwise
-rw-r--r--contrib/gnunet_peerinfo_gtk_main_window.glade4
-rw-r--r--src/peerinfo/gnunet-peerinfo-gtk.c14
2 files changed, 10 insertions, 8 deletions
diff --git a/contrib/gnunet_peerinfo_gtk_main_window.glade b/contrib/gnunet_peerinfo_gtk_main_window.glade
index 2a65db13..42cbe37e 100644
--- a/contrib/gnunet_peerinfo_gtk_main_window.glade
+++ b/contrib/gnunet_peerinfo_gtk_main_window.glade
@@ -13,9 +13,9 @@
13 <!-- column-name country_flag --> 13 <!-- column-name country_flag -->
14 <column type="GdkPixbuf"/> 14 <column type="GdkPixbuf"/>
15 <!-- column-name bandwidth_in --> 15 <!-- column-name bandwidth_in -->
16 <column type="guint64"/> 16 <column type="guint"/>
17 <!-- column-name bandwidth_out --> 17 <!-- column-name bandwidth_out -->
18 <column type="guint64"/> 18 <column type="guint"/>
19 <!-- column-name addresses --> 19 <!-- column-name addresses -->
20 <column type="gchararray"/> 20 <column type="gchararray"/>
21 <!-- column-name connectivity_led --> 21 <!-- column-name connectivity_led -->
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c b/src/peerinfo/gnunet-peerinfo-gtk.c
index 533f3f1b..7c59c290 100644
--- a/src/peerinfo/gnunet-peerinfo-gtk.c
+++ b/src/peerinfo/gnunet-peerinfo-gtk.c
@@ -327,12 +327,13 @@ peer_address_string_cb (void *cls, const char *address)
327/** 327/**
328 * Function to call with a binary format of an address 328 * Function to call with a binary format of an address
329 * 329 *
330 * @param cls the 'struct PeerInfo' for which this is a valid address 330 * @param cls the `struct PeerInfo` for which this is a valid address
331 * @param peer peer the update is about 331 * @param peer peer the update is about
332 * @param address NULL on disconnect, otherwise 0-terminated printable UTF-8 string 332 * @param address NULL on disconnect, otherwise 0-terminated printable UTF-8 string
333 */ 333 */
334static void 334static void
335peer_address_cb (void *cls, const struct GNUNET_PeerIdentity *peer, 335peer_address_cb (void *cls,
336 const struct GNUNET_PeerIdentity *peer,
336 const struct GNUNET_HELLO_Address *address) 337 const struct GNUNET_HELLO_Address *address)
337{ 338{
338 struct PeerInfo *info = cls; 339 struct PeerInfo *info = cls;
@@ -378,7 +379,8 @@ peer_address_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
378 * @param err_msg NULL if successful, otherwise contains error message 379 * @param err_msg NULL if successful, otherwise contains error message
379 */ 380 */
380static void 381static void
381peerinfo_processor (void *cls, const struct GNUNET_PeerIdentity *peer, 382peerinfo_processor (void *cls,
383 const struct GNUNET_PeerIdentity *peer,
382 const struct GNUNET_HELLO_Message *hello, 384 const struct GNUNET_HELLO_Message *hello,
383 const char *err_msg) 385 const char *err_msg)
384{ 386{
@@ -434,7 +436,7 @@ peerinfo_processor (void *cls, const struct GNUNET_PeerIdentity *peer,
434 * @param bandwidth_in available amount of inbound bandwidth 436 * @param bandwidth_in available amount of inbound bandwidth
435 * @param bandwidth_out available amount of outbound bandwidth 437 * @param bandwidth_out available amount of outbound bandwidth
436 * @param ats performance data for the address (as far as known) 438 * @param ats performance data for the address (as far as known)
437 * @param ats_count number of performance records in 'ats' 439 * @param ats_count number of performance records in @a ats
438 */ 440 */
439static void 441static void
440status_cb (void *cls, 442status_cb (void *cls,
@@ -459,8 +461,8 @@ status_cb (void *cls,
459 GNUNET_assert (TRUE == gtk_tree_model_get_iter (GTK_TREE_MODEL (ls), &iter, path)); 461 GNUNET_assert (TRUE == gtk_tree_model_get_iter (GTK_TREE_MODEL (ls), &iter, path));
460 gtk_tree_path_free (path); 462 gtk_tree_path_free (path);
461 gtk_list_store_set (ls, &iter, 463 gtk_list_store_set (ls, &iter,
462 PEERINFO_MC_BANDWIDTH_IN, (guint64) ntohl (bandwidth_in.value__), 464 PEERINFO_MC_BANDWIDTH_IN, (guint) ntohl (bandwidth_in.value__),
463 PEERINFO_MC_BANDWIDTH_OUT, (guint64) ntohl (bandwidth_out.value__), 465 PEERINFO_MC_BANDWIDTH_OUT, (guint) ntohl (bandwidth_out.value__),
464 -1); 466 -1);
465} 467}
466 468