*
* @param cls closure
* @param address the address
- * @param active is this address in active use
+ * @param active #GNUNET_YES if this address is actively used
+ * to maintain a connection to a peer;
+ * #GNUNET_NO if the address is not actively used;
+ * #GNUNET_SYSERR if this address is no longer available for ATS
* @param bandwidth_out assigned outbound bandwidth for the connection
* @param bandwidth_in assigned inbound bandwidth for the connection
* @param ats performance data for the address (as far as known)
uint32_t distance;
enum GNUNET_ATS_Network_Type network = GNUNET_ATS_NET_UNSPECIFIED;
- if (GNUNET_NO == active)
+ if (NULL == address)
+ {
+ /* ATS service temporarily disconnected */
+ return;
+ }
+
+ if (GNUNET_YES != active)
+ {
+ // FIXME: handle disconnect/inactive case too!
return;
+ }
distance = get_atsi_distance (ats, ats_count);
network = get_atsi_network (ats, ats_count);
GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network);