[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29739 - gnunet-gtk/src/peerinfo
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29739 - gnunet-gtk/src/peerinfo |
Date: |
Tue, 1 Oct 2013 08:40:32 +0200 |
Author: grothoff
Date: 2013-10-01 08:40:32 +0200 (Tue, 01 Oct 2013)
New Revision: 29739
Modified:
gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
Log:
-fix FTBFS
Modified: gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
===================================================================
--- gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c 2013-09-30 22:15:25 UTC
(rev 29738)
+++ gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c 2013-10-01 06:40:32 UTC
(rev 29739)
@@ -127,7 +127,7 @@
/**
* Map of peer identities to the respective PeerInfo for our view.
*/
-static struct GNUNET_CONTAINER_MultiHashMap *peer2info;
+static struct GNUNET_CONTAINER_MultiPeerMap *peer2info;
/**
* Should gnunet-peerinfo-gtk start in tray mode?
@@ -181,10 +181,12 @@
* @param cls unused
* @param key peer identity
* @param value the 'struct PeerInfo'
- * @return GNUNET_OK (continue to iterate)
+ * @return #GNUNET_OK (continue to iterate)
*/
static int
-free_paths (void *cls, const struct GNUNET_HashCode * key, void *value)
+free_paths (void *cls,
+ const struct GNUNET_PeerIdentity *key,
+ void *value)
{
struct PeerInfo *info = value;
@@ -226,8 +228,8 @@
GNUNET_ATS_performance_done (ats);
ats = NULL;
}
- GNUNET_CONTAINER_multihashmap_iterate (peer2info, &free_paths, NULL);
- GNUNET_CONTAINER_multihashmap_destroy (peer2info);
+ GNUNET_CONTAINER_multipeermap_iterate (peer2info, &free_paths, NULL);
+ GNUNET_CONTAINER_multipeermap_destroy (peer2info);
peer2info = NULL;
GNUNET_PEERINFO_GTK_flags_shutdown ();
}
@@ -352,20 +354,15 @@
const char *err_msg)
{
GtkTreeIter iter;
- char *npid;
- struct GNUNET_CRYPTO_HashAsciiEncoded enc;
struct PeerInfo *info;
GtkTreePath *path;
- info = GNUNET_CONTAINER_multihashmap_get (peer2info, &peer->hashPubKey);
+ info = GNUNET_CONTAINER_multipeermap_get (peer2info, peer);
if (NULL == info)
{
- GNUNET_CRYPTO_hash_to_enc (&peer->hashPubKey, &enc);
- npid = (char *) &enc;
- npid[4] = '\0';
gtk_list_store_append (ls, &iter);
gtk_list_store_set (ls, &iter,
- PEERINFO_MC_PEER_IDENTITY_STRING, npid,
+ PEERINFO_MC_PEER_IDENTITY_STRING, GNUNET_i2s (peer),
PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 0,
PEERINFO_MC_COUNTRY_NAME, "",
PEERINFO_MC_COUNTRY_FLAG, NULL,
@@ -380,7 +377,7 @@
info->rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (ls), path);
GNUNET_assert (NULL != info->rr);
gtk_tree_path_free (path);
- GNUNET_CONTAINER_multihashmap_put (peer2info, &peer->hashPubKey, info,
+ GNUNET_CONTAINER_multipeermap_put (peer2info, peer, info,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
}
if (NULL == info->palc)
@@ -421,7 +418,7 @@
if (GNUNET_YES != address_active)
return;
- info = GNUNET_CONTAINER_multihashmap_get (peer2info,
&address->peer.hashPubKey);
+ info = GNUNET_CONTAINER_multipeermap_get (peer2info, &address->peer);
if (NULL == info)
return; /* should rarely happen... */
path = gtk_tree_row_reference_get_path (info->rr);
@@ -493,7 +490,7 @@
led_red = load_led ("red");
GNUNET_GTK_set_icon_search_path ();
GNUNET_GTK_setup_nls ();
- peer2info = GNUNET_CONTAINER_multihashmap_create (256, GNUNET_NO);
+ peer2info = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO);
pnc =
GNUNET_PEERINFO_notify (get_configuration (),
GNUNET_NO,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29739 - gnunet-gtk/src/peerinfo,
gnunet <=