gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 139/164: Fixed wrong argument for mode of operation


From: gnunet
Subject: [gnunet] 139/164: Fixed wrong argument for mode of operation
Date: Fri, 30 Jul 2021 15:33:25 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 9e74e75b2bd25d262a8762a3a35e7ff8abcf4d29
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Tue Jun 8 08:31:53 2021 +0200

    Fixed wrong argument for mode of operation
---
 src/setu/gnunet-service-setu.c          | 17 +++++++----------
 src/setu/gnunet-service-setu_protocol.h |  8 ++++++++
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index e7daac5e4..8a4c223f2 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -1224,7 +1224,6 @@ update_message_control_flow (struct 
GNUNET_CONTAINER_MultiHashMap *hash_map,
   *mcfs = new_mcfs;
   GNUNET_CONTAINER_multihashmap_put (hash_map, hash_code,cfe,
                                      
GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE);
-  free(cfe);
   return GNUNET_YES;
 }
 
@@ -2348,11 +2347,11 @@ handle_union_p2p_strata_estimator (void *cls,
     diff_local = op->byzantine_upper_bound - op->local_element_count;
   if ((diff_remote < 0) || (diff_local < 0))
   {
+    strata_estimator_destroy (remote_se);
     LOG (GNUNET_ERROR_TYPE_ERROR,
          "PROTOCOL VIOLATION: More element is set as upper boundary or other 
peer is "
          "malicious: remote diff %ld, local diff: %ld\n",
          diff_remote, diff_local);
-    free(remote_se);
     GNUNET_break_op (0);
     fail_union_operation (op);
     return;
@@ -2390,8 +2389,8 @@ handle_union_p2p_strata_estimator (void *cls,
                                                              elements),
                                                            op->
                                                            
remote_element_count,
-                                                           diff_local,
                                                            diff_remote,
+                                                           diff_local,
                                                            op->
                                                            
rtt_bandwidth_tradeoff,
                                                            op->
@@ -2429,7 +2428,6 @@ handle_union_p2p_strata_estimator (void *cls,
   if ((GNUNET_YES == op->byzantine) &&
       (other_size < op->byzantine_lower_bound))
   {
-    free(remote_se);
     GNUNET_break (0);
     fail_union_operation (op);
     return;
@@ -2492,7 +2490,6 @@ handle_union_p2p_strata_estimator (void *cls,
                                             op->ibf_bucket_number_factor)))
     {
       /* Internal error, best we can do is shut the connection */
-      free(remote_se);
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Failed to send IBF, closing connection\n");
       fail_union_operation (op);
@@ -2888,8 +2885,8 @@ handle_union_p2p_send_full (void *cls,
                                                            
remote_element_count,
                                                            op->
                                                            local_element_count,
-                                                           op->remote_set_diff,
                                                            op->local_set_diff,
+                                                           op->remote_set_diff,
                                                            op->
                                                            
rtt_bandwidth_tradeoff,
                                                            op->
@@ -3638,8 +3635,8 @@ handle_union_p2p_request_full (void *cls,
                                                            
remote_element_count,
                                                            op->
                                                            local_element_count,
-                                                           op->remote_set_diff,
                                                            op->local_set_diff,
+                                                           op->remote_set_diff,
                                                            op->
                                                            
rtt_bandwidth_tradeoff,
                                                            op->
@@ -4019,7 +4016,7 @@ handle_union_p2p_offer (void *cls,
           DEMAND_MESSAGE)
         )
     {
-      free(ev);
+      //GNUNET_free (ev);
       LOG (GNUNET_ERROR_TYPE_ERROR,
            "Double demand message sent found!\n");
       GNUNET_break (0);
@@ -4037,7 +4034,7 @@ handle_union_p2p_offer (void *cls,
           OFFER_MESSAGE)
         )
     {
-      free(ev);
+      //GNUNET_free (ev);
       LOG (GNUNET_ERROR_TYPE_ERROR,
            "Double offer message received found!\n");
       GNUNET_break (0);
@@ -4055,7 +4052,7 @@ handle_union_p2p_offer (void *cls,
           ELEMENT_MESSAGE)
         )
     {
-      free(ev);
+      //GNUNET_free (ev);
       LOG (GNUNET_ERROR_TYPE_ERROR,
            "Element already expected!\n");
       GNUNET_break (0);
diff --git a/src/setu/gnunet-service-setu_protocol.h 
b/src/setu/gnunet-service-setu_protocol.h
index a80b343da..055fb7702 100644
--- a/src/setu/gnunet-service-setu_protocol.h
+++ b/src/setu/gnunet-service-setu_protocol.h
@@ -88,6 +88,14 @@ struct IBFMessage
 
   /* rest: buckets */
 };
+/**
+estimate_best_mode_of_operation (uint64_t avg_element_size,
+uint64_t local_set_size,
+        uint64_t remote_set_size,
+uint64_t est_set_diff_remote,
+        uint64_t est_set_diff_local,)
+        **/
+
 
 
 struct InquiryMessage

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]