-fix #2598
[oweals/gnunet.git] / src / fs / gnunet-service-fs_pr.h
index ab088f88f413275f6ef43d1a1fb3bce036b98bf3..ab5ce0fab940899e08799630b73587fb5f2d5dab 100644 (file)
@@ -88,24 +88,26 @@ struct GSF_PendingRequestData
 
   /**
    * Namespace to query, only set if the type is SBLOCK.
+   * Allocated after struct only if needed. Do not free!
    */
-  struct GNUNET_HashCode namespace;
+  const struct GNUNET_HashCode *namespace;
 
   /**
    * Identity of a peer hosting the content, only set if
    * 'has_target' is GNUNET_YES.
+   * Allocated after struct only if needed. Do not free!
    */
-  struct GNUNET_PeerIdentity target;
+  const struct GNUNET_PeerIdentity *target;
 
   /**
    * Fields for the plan module to track a DLL with the request.
    */
-  struct GSF_RequestPlanReference *rpr_head;
+  struct GSF_PendingRequestPlanBijection *pr_head;
 
   /**
    * Fields for the plan module to track a DLL with the request.
    */
-  struct GSF_RequestPlanReference *rpr_tail;
+  struct GSF_PendingRequestPlanBijection *pr_tail;
 
   /**
    * Current TTL for the request.
@@ -132,6 +134,22 @@ struct GSF_PendingRequestData
    */
   uint32_t original_priority;
 
+  /**
+   * Counter for how often this request has been transmitted (estimate,
+   * because we might have the same request pending for multiple clients,
+   * and of course because a transmission may have failed at a lower
+   * layer).
+   */
+  uint32_t num_transmissions;
+
+  /**
+   * How much respect did we (in total) offer for this request so far (estimate,
+   * because we might have the same request pending for multiple clients,
+   * and of course because a transmission may have failed at a lower
+   * layer).
+   */
+  uint32_t respect_offered;
+
   /**
    * Options for the request.
    */
@@ -147,11 +165,6 @@ struct GSF_PendingRequestData
    */
   unsigned int results_found;
 
-  /**
-   * Is the 'target' value set to a valid peer identity?
-   */
-  int has_target;
-
   /**
    * Has this request been started yet (local/p2p operations)?  Or are
    * we still constructing it?