gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35091 - gnunet-gtk/src/peerinfo


From: gnunet
Subject: [GNUnet-SVN] r35091 - gnunet-gtk/src/peerinfo
Date: Tue, 3 Feb 2015 20:07:02 +0100

Author: grothoff
Date: 2015-02-03 20:07:02 +0100 (Tue, 03 Feb 2015)
New Revision: 35091

Modified:
   gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
Log:
-fix #3648: adapt to API change'


Modified: gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c
===================================================================
--- gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c       2015-02-03 17:40:54 UTC 
(rev 35090)
+++ gnunet-gtk/src/peerinfo/gnunet-peerinfo-gtk.c       2015-02-03 19:07:02 UTC 
(rev 35091)
@@ -1185,8 +1185,6 @@
  * Function to call with validation information about a peer
  *
  * @param cts closure
- * @param peer peer this update is about,
- *      NULL if this is the final last callback for a iteration operation
  * @param address address, NULL for disconnect notification in monitor mode
  * @param last_validation when was this address last validated
  * @param valid_until when does this address expire
@@ -1195,7 +1193,6 @@
  */
 static void
 validation_monitor_cb (void *cts,
-                      const struct GNUNET_PeerIdentity *peer,
                       const struct GNUNET_HELLO_Address *address,
                        struct GNUNET_TIME_Absolute last_validation,
                       struct GNUNET_TIME_Absolute valid_until,
@@ -1209,7 +1206,7 @@
   gboolean valid;
   GdkPixbuf *led;
 
-  if (NULL == peer)
+  if (NULL == address)
   {
     /* disconnect notification, reset all validation state */
     GNUNET_CONTAINER_multipeermap_iterate (peer2info,
@@ -1239,21 +1236,7 @@
     led = NULL;
     break;
   }
-  info = get_peer_info (peer);
-  if (NULL == address)
-  {
-    /* disconnect, mark all as down */
-    for (pa = info->pa_head; NULL != pa; pa = pa->next)
-    {
-      get_iter_from_rr (pa->rr, &iter);
-      gtk_tree_store_set (ts, &iter,
-                          PEERINFO_MC_VALIDATION_IS_VALID, FALSE,
-                          PEERINFO_MC_VALIDATION_TIMEOUT_AS_STRING, NULL,
-                          PEERINFO_MC_VALIDATION_STATE_LED, NULL,
-                          -1);
-    }
-    return;
-  }
+  info = get_peer_info (&address->peer);
   valid = (GNUNET_TIME_absolute_get_remaining (valid_until).rel_value_us > 0);
   if (valid)
     led = led_green; /* UGH: should this not be indicated by 'state' somehow? 
*/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]