Fixed reconnect
[oweals/gnunet.git] / src / fs / gnunet-service-fs_pe.c
index 58fb11cee6153d9d5a07f42ab5ae4f4aac50fc62..1ed7085c40e9d258254f0e81eb0a1417bc7c24ab 100644 (file)
@@ -31,7 +31,7 @@
 
 
 /**
- * List of GSF_PendingRequests this request plan 
+ * List of GSF_PendingRequests this request plan
  * participates with.
  */
 struct PendingRequestList;
@@ -67,7 +67,7 @@ struct GSF_RequestPlanReference
 
 
 /**
- * List of GSF_PendingRequests this request plan 
+ * List of GSF_PendingRequests this request plan
  * participates with.
  */
 struct PendingRequestList
@@ -207,9 +207,9 @@ static unsigned long long plan_count;
  * @param cls the 'struct GSF_ConnectedPeer' for transmission
  * @param tc scheduler context
  */
-static void schedule_peer_transmission (void *cls,
-                                        const struct
-                                        GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_peer_transmission (void *cls,
+                            const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -228,7 +228,7 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
                          gettext_noop ("# average retransmission delay (ms)"),
                          total_delay * 1000LL / plan_count, GNUNET_NO);
   prd = GSF_pending_request_get_data_ (rp->prl_head->pr);
-  // FIXME: calculate 'rp->priority'!  
+  // FIXME: calculate 'rp->priority'!
   if (rp->transmission_counter < 32)
     delay =
         GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,
@@ -243,8 +243,8 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
 #endif
 
   GNUNET_assert (rp->hn == NULL);
-  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
-      rel_value == 0)
+  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value
+      == 0)
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, rp->priority);
   else
     rp->hn =
@@ -359,8 +359,8 @@ schedule_peer_transmission (void *cls,
   }
   /* move ready requests to priority queue */
   while ((NULL != (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap))) &&
-         (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
-          rel_value == 0))
+         (GNUNET_TIME_absolute_get_remaining
+          (rp->earliest_transmission).rel_value == 0))
   {
     GNUNET_assert (rp == GNUNET_CONTAINER_heap_remove_root (pp->delay_heap));
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, rp->priority);
@@ -380,9 +380,9 @@ schedule_peer_transmission (void *cls,
 #if DEBUG_FS
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Sleeping for %llu ms before retrying requests on plan %p.\n",
-                (unsigned long long) GNUNET_TIME_absolute_get_remaining (rp->
-                                                                         earliest_transmission).
-                rel_value, pp);
+                (unsigned long long)
+                GNUNET_TIME_absolute_get_remaining
+                (rp->earliest_transmission).rel_value, pp);
 #endif
     pp->task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
@@ -533,7 +533,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr)
  * Notify the plan about a peer being no longer available;
  * destroy all entries associated with this peer.
  *
- * @param cp connected peer 
+ * @param cp connected peer
  */
 void
 GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp)