diff options
-rw-r--r-- | src/peerinfo/gnunet-peerinfo-gtk.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c b/src/peerinfo/gnunet-peerinfo-gtk.c index 4d0e1c81..84bc925b 100644 --- a/src/peerinfo/gnunet-peerinfo-gtk.c +++ b/src/peerinfo/gnunet-peerinfo-gtk.c | |||
@@ -1185,8 +1185,6 @@ reset_address_validation_status (void *cls, | |||
1185 | * Function to call with validation information about a peer | 1185 | * Function to call with validation information about a peer |
1186 | * | 1186 | * |
1187 | * @param cts closure | 1187 | * @param cts closure |
1188 | * @param peer peer this update is about, | ||
1189 | * NULL if this is the final last callback for a iteration operation | ||
1190 | * @param address address, NULL for disconnect notification in monitor mode | 1188 | * @param address address, NULL for disconnect notification in monitor mode |
1191 | * @param last_validation when was this address last validated | 1189 | * @param last_validation when was this address last validated |
1192 | * @param valid_until when does this address expire | 1190 | * @param valid_until when does this address expire |
@@ -1195,7 +1193,6 @@ reset_address_validation_status (void *cls, | |||
1195 | */ | 1193 | */ |
1196 | static void | 1194 | static void |
1197 | validation_monitor_cb (void *cts, | 1195 | validation_monitor_cb (void *cts, |
1198 | const struct GNUNET_PeerIdentity *peer, | ||
1199 | const struct GNUNET_HELLO_Address *address, | 1196 | const struct GNUNET_HELLO_Address *address, |
1200 | struct GNUNET_TIME_Absolute last_validation, | 1197 | struct GNUNET_TIME_Absolute last_validation, |
1201 | struct GNUNET_TIME_Absolute valid_until, | 1198 | struct GNUNET_TIME_Absolute valid_until, |
@@ -1209,7 +1206,7 @@ validation_monitor_cb (void *cts, | |||
1209 | gboolean valid; | 1206 | gboolean valid; |
1210 | GdkPixbuf *led; | 1207 | GdkPixbuf *led; |
1211 | 1208 | ||
1212 | if (NULL == peer) | 1209 | if (NULL == address) |
1213 | { | 1210 | { |
1214 | /* disconnect notification, reset all validation state */ | 1211 | /* disconnect notification, reset all validation state */ |
1215 | GNUNET_CONTAINER_multipeermap_iterate (peer2info, | 1212 | GNUNET_CONTAINER_multipeermap_iterate (peer2info, |
@@ -1239,21 +1236,7 @@ validation_monitor_cb (void *cts, | |||
1239 | led = NULL; | 1236 | led = NULL; |
1240 | break; | 1237 | break; |
1241 | } | 1238 | } |
1242 | info = get_peer_info (peer); | 1239 | info = get_peer_info (&address->peer); |
1243 | if (NULL == address) | ||
1244 | { | ||
1245 | /* disconnect, mark all as down */ | ||
1246 | for (pa = info->pa_head; NULL != pa; pa = pa->next) | ||
1247 | { | ||
1248 | get_iter_from_rr (pa->rr, &iter); | ||
1249 | gtk_tree_store_set (ts, &iter, | ||
1250 | PEERINFO_MC_VALIDATION_IS_VALID, FALSE, | ||
1251 | PEERINFO_MC_VALIDATION_TIMEOUT_AS_STRING, NULL, | ||
1252 | PEERINFO_MC_VALIDATION_STATE_LED, NULL, | ||
1253 | -1); | ||
1254 | } | ||
1255 | return; | ||
1256 | } | ||
1257 | valid = (GNUNET_TIME_absolute_get_remaining (valid_until).rel_value_us > 0); | 1240 | valid = (GNUNET_TIME_absolute_get_remaining (valid_until).rel_value_us > 0); |
1258 | if (valid) | 1241 | if (valid) |
1259 | led = led_green; /* UGH: should this not be indicated by 'state' somehow? */ | 1242 | led = led_green; /* UGH: should this not be indicated by 'state' somehow? */ |