dn->cth =
GNUNET_CORE_notify_transmit_ready (core_api,
GNUNET_YES /* cork */,
- 0 /* priority */,
+ GNUNET_CORE_PRIO_BEST_EFFORT,
GNUNET_TIME_UNIT_FOREVER_REL,
&dn->peer,
msize,
if (NULL == target->cth)
target->cth = GNUNET_CORE_notify_transmit_ready (core_api,
GNUNET_YES /* cork */,
- 0 /* priority */,
+ GNUNET_CORE_PRIO_BEST_EFFORT,
GNUNET_TIME_UNIT_FOREVER_REL,
&target->peer,
msize,
*
* @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);
{
GNUNET_break_op (0);
GNUNET_free (target);
+ return GNUNET_SYSERR;
}
add_new_route (target, neighbor);
}