gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 147/164: Fixed some stuff


From: gnunet
Subject: [gnunet] 147/164: Fixed some stuff
Date: Fri, 30 Jul 2021 15:33:33 +0200

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

grothoff pushed a commit to branch master
in repository gnunet.

commit 78104aa373e341c7278849d8ebe60278ee15a0d9
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Thu Jun 10 01:30:27 2021 +0200

    Fixed some stuff
---
 src/setu/gnunet-service-setu.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index add2127af..18cf990fa 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -807,10 +807,10 @@ struct per_store_struct perf_store;
 
 enum MESSAGE_CONTROL_FLOW_STATE
 {
-  MESSAGE_EMPTY,
-  MESSAGE_SENT,
-  MESSAGE_EXPECTED,
-  MESSAGE_RECEIVED,
+  MSG_CFS_UNINITIALIZED,
+  MSG_CFS_SENT,
+  MSG_CFS_EXPECTED,
+  MSG_CFS_RECEIVED,
 };
 
 /**
@@ -1197,14 +1197,14 @@ update_message_control_flow (struct 
GNUNET_CONTAINER_MultiHashMap *hash_map,
   else if (ELEMENT_MESSAGE == mt)
   {
     mcfs = &cfe->element;
-    if ((new_mcfs != MESSAGE_SENT) && (MESSAGE_RECEIVED != cfe->offer) )
+    if ((new_mcfs != MSG_CFS_SENT) && (MSG_CFS_RECEIVED != cfe->offer) )
     {
       LOG (GNUNET_ERROR_TYPE_ERROR,
            "Received an element without sent offer!\n");
       return GNUNET_NO;
     }
     /* Check that only requested elements are received! */
-    if ((new_mcfs != MESSAGE_SENT) && (cfe->demand != MESSAGE_SENT) )
+    if ((new_mcfs != MSG_CFS_SENT) && (cfe->demand != MSG_CFS_SENT) )
     {
       LOG (GNUNET_ERROR_TYPE_ERROR,
            "Received an element that was not demanded\n");
@@ -1258,7 +1258,7 @@ is_message_in_message_control_flow (struct
       } else {
           return GNUNET_SYSERR;
       }
-      if (*mcfs != MESSAGE_EMPTY) {
+      if (*mcfs != MSG_CFS_UNINITIALIZED) {
           return GNUNET_NO;
       }
   }
@@ -1283,7 +1283,7 @@ determinate_done_message_iterator (void *cls,
 {
   struct messageControlFlowElement *mcfe = value;
 
-  if (((mcfe->element == MESSAGE_SENT) || (mcfe->element == MESSAGE_RECEIVED) 
))
+  if (((mcfe->element == MSG_CFS_SENT) || (mcfe->element == MSG_CFS_RECEIVED) 
))
   {
     return GNUNET_YES;
   }
@@ -2536,7 +2536,7 @@ send_offers_iterator (void *cls,
   if (GNUNET_YES !=
       update_message_control_flow (
         op->message_control_flow,
-        MESSAGE_SENT,
+        MSG_CFS_SENT,
         &ke->element->element_hash,
         OFFER_MESSAGE)
       )
@@ -2553,7 +2553,7 @@ send_offers_iterator (void *cls,
   if (GNUNET_YES !=
       update_message_control_flow (
         op->message_control_flow,
-        MESSAGE_EXPECTED,
+        MSG_CFS_EXPECTED,
         &ke->element->element_hash,
         DEMAND_MESSAGE)
       )
@@ -2773,7 +2773,7 @@ decode_and_send (struct Operation *op)
       struct GNUNET_HashCode *hashed_key = (struct
                                             GNUNET_HashCode*) GNUNET_malloc (
         sizeof(struct GNUNET_HashCode));
-      enum MESSAGE_CONTROL_FLOW_STATE mcfs = MESSAGE_SENT;
+      enum MESSAGE_CONTROL_FLOW_STATE mcfs = MSG_CFS_SENT;
       GNUNET_CRYPTO_hash_context_read (hashed_key_context,
                                        &key,
                                        sizeof(struct IBF_Key));
@@ -3239,7 +3239,7 @@ handle_union_p2p_elements (void *cls,
   if (GNUNET_OK !=
       update_message_control_flow (
         op->message_control_flow,
-        MESSAGE_RECEIVED,
+        MSG_CFS_RECEIVED,
         &ee->element_hash,
         ELEMENT_MESSAGE)
       )
@@ -3497,7 +3497,7 @@ handle_union_p2p_inquiry (void *cls,
     GNUNET_CRYPTO_hash_context_start ();
   struct GNUNET_HashCode *hashed_key = (struct GNUNET_HashCode*) GNUNET_malloc 
(
     sizeof(struct GNUNET_HashCode));;
-  enum MESSAGE_CONTROL_FLOW_STATE mcfs = MESSAGE_RECEIVED;
+  enum MESSAGE_CONTROL_FLOW_STATE mcfs = MSG_CFS_RECEIVED;
   GNUNET_CRYPTO_hash_context_read (hashed_key_context,
                                    &ibf_key,
                                    sizeof(struct IBF_Key));
@@ -3830,7 +3830,7 @@ handle_union_p2p_demand (void *cls,
     if (GNUNET_YES !=
         update_message_control_flow (
           op->message_control_flow,
-          MESSAGE_RECEIVED,
+          MSG_CFS_RECEIVED,
           &ee->element_hash,
           DEMAND_MESSAGE)
         )
@@ -3847,7 +3847,7 @@ handle_union_p2p_demand (void *cls,
     if (GNUNET_YES !=
         update_message_control_flow (
           op->message_control_flow,
-          MESSAGE_SENT,
+          MSG_CFS_SENT,
           &ee->element_hash,
           ELEMENT_MESSAGE)
         )
@@ -4009,7 +4009,7 @@ handle_union_p2p_offer (void *cls,
     if (GNUNET_YES !=
         update_message_control_flow (
           op->message_control_flow,
-          MESSAGE_SENT,
+          MSG_CFS_SENT,
           hash,
           DEMAND_MESSAGE)
         )
@@ -4027,7 +4027,7 @@ handle_union_p2p_offer (void *cls,
     if (GNUNET_YES !=
         update_message_control_flow (
           op->message_control_flow,
-          MESSAGE_RECEIVED,
+          MSG_CFS_RECEIVED,
           hash,
           OFFER_MESSAGE)
         )
@@ -4045,7 +4045,7 @@ handle_union_p2p_offer (void *cls,
     if (GNUNET_YES !=
         update_message_control_flow (
           op->message_control_flow,
-          MESSAGE_EXPECTED,
+          MSG_CFS_EXPECTED,
           hash,
           ELEMENT_MESSAGE)
         )

-- 
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]