TM_BOTH = 2
};
-struct GST_ManipulationHandle man_handle;
-
-
/**
* Struct containing information about manipulations to a specific peer
void *cont_cls;
};
+struct GST_ManipulationHandle man_handle;
+
/**
* DLL head for delayed messages based on general delay
*/
if (NULL != tmp)
{
+ GNUNET_break (GNUNET_YES == GST_neighbours_test_connected (&dqe->id));
tmp->send_delay_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_CONTAINER_DLL_remove (tmp->send_head, tmp->send_tail, dqe);
GST_neighbours_send (&dqe->id, dqe->msg, dqe->msg_size, dqe->timeout, dqe->cont, dqe->cont_cls);
}
else
{
- /* Remove from generic queue */
+ /* Remove from generic queue */
+ GNUNET_break (GNUNET_YES == GST_neighbours_test_connected (&dqe->id));
generic_send_delay_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_CONTAINER_DLL_remove (generic_dqe_head, generic_dqe_tail, dqe);
GST_neighbours_send (&dqe->id, dqe->msg, dqe->msg_size, dqe->timeout, dqe->cont, dqe->cont_cls);
if (NULL != (tmp = GNUNET_CONTAINER_multihashmap_get (man_handle.peers, &target->hashPubKey)))
{
+ GNUNET_break (GNUNET_YES == GST_neighbours_test_connected(target));
/* Manipulate here */
/* Delay */
if (UINT32_MAX != find_metric(tmp, GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND))
}
else if (UINT32_MAX != find_metric (&man_handle.general, GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND))
{
+ GNUNET_break (GNUNET_YES == GST_neighbours_test_connected(target));
/* We have a delay */
delay.rel_value = find_metric (&man_handle.general, GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND);
dqe = GNUNET_malloc (sizeof (struct DelayQueueEntry) + msg_size);
if (NULL != value)
{
struct TM_Peer *tmp = (struct TM_Peer *) value;
- GNUNET_CONTAINER_multihashmap_remove (man_handle.peers, key, value);
+ if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (man_handle.peers, key, value))
+ GNUNET_break (0);
free_metric (tmp);
next = tmp->send_head;
while (NULL != (dqe = next))
next = generic_dqe_head;
while (NULL != (dqe = next))
{
- if (0 == memcmp (&peer, &dqe->id, sizeof (dqe->id)))
+ next = dqe->next;
+ if (0 == memcmp (peer, &dqe->id, sizeof (dqe->id)))
{
GNUNET_CONTAINER_DLL_remove (generic_dqe_head, generic_dqe_tail, dqe);
if (NULL != dqe->cont)
dqe->cont (dqe->cont_cls, GNUNET_SYSERR, dqe->msg_size, 0);
GNUNET_free (dqe);
-
}
}
if (GNUNET_SCHEDULER_NO_TASK != generic_send_delay_task)