summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_manipulation.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-12-29 17:06:08 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-12-29 17:06:08 +0000
commit51f61878a275964742c245e1695a6c8ef4e40b4c (patch)
tree05a584f0e8a37df12d1f8996ef2d97fab9e93be3 /src/transport/gnunet-service-transport_manipulation.c
parent6d3887bdfe0cd6d1fd69d4fd78ab5bf3663643ea (diff)
fix indent
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.c')
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c81
1 files changed, 42 insertions, 39 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index da3fc2de9..0d087c3bd 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -679,47 +679,50 @@ free_tmps (void *cls,
* @param peer the disconnecting peer
*/
void
-GST_manipulation_peer_disconnect (const struct GNUNET_PeerIdentity *peer)
+GST_manipulation_peer_disconnect(const struct GNUNET_PeerIdentity *peer)
{
- struct TM_Peer *tmp;
- struct DelayQueueEntry *dqe;
- struct DelayQueueEntry *next;
+ struct TM_Peer *tmp;
+ struct DelayQueueEntry *dqe;
+ struct DelayQueueEntry *next;
- if (NULL != (tmp = GNUNET_CONTAINER_multipeermap_get (man_handle.peers, peer)))
- {
- next = tmp->send_head;
- while (NULL != (dqe = next))
- {
- next = dqe->next;
- GNUNET_CONTAINER_DLL_remove (tmp->send_head, tmp->send_tail, dqe);
- if (NULL != dqe->cont)
- dqe->cont (dqe->cont_cls, GNUNET_SYSERR, dqe->msg_size, 0);
- GNUNET_free (dqe);
- }
- }
- else if (UINT32_MAX != find_metric (&man_handle.general, GNUNET_ATS_QUALITY_NET_DELAY, TM_SEND))
- {
- next = generic_dqe_head;
- while (NULL != (dqe = next))
- {
- 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)
- {
- GNUNET_SCHEDULER_cancel (generic_send_delay_task);
- if (NULL != generic_dqe_head)
- generic_send_delay_task = GNUNET_SCHEDULER_add_delayed (
- GNUNET_TIME_absolute_get_remaining(generic_dqe_head->sent_at),
- &send_delayed, generic_dqe_head);
- }
- }
+ if (NULL != (tmp = GNUNET_CONTAINER_multipeermap_get(man_handle.peers, peer)))
+ {
+ next = tmp->send_head;
+ while (NULL != (dqe = next))
+ {
+ next = dqe->next;
+ GNUNET_CONTAINER_DLL_remove(tmp->send_head, tmp->send_tail, dqe);
+ if (NULL != dqe->cont)
+ dqe->cont(dqe->cont_cls, GNUNET_SYSERR, dqe->msg_size, 0);
+ GNUNET_free(dqe);
+ }
+ }
+ else if (UINT32_MAX
+ != find_metric(&man_handle.general, GNUNET_ATS_QUALITY_NET_DELAY,
+ TM_SEND))
+ {
+ next = generic_dqe_head;
+ while (NULL != (dqe = next))
+ {
+ 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)
+ {
+ GNUNET_SCHEDULER_cancel(generic_send_delay_task);
+ if (NULL != generic_dqe_head)
+ generic_send_delay_task = GNUNET_SCHEDULER_add_delayed(
+ GNUNET_TIME_absolute_get_remaining(generic_dqe_head->sent_at),
+ &send_delayed, generic_dqe_head);
+ }
+ }
}