[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 142/164: Maded struct camelcase
From: |
gnunet |
Subject: |
[gnunet] 142/164: Maded struct camelcase |
Date: |
Fri, 30 Jul 2021 15:33:28 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 8ff1e6e82302f41cce54131a3c31c442d01af4bd
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Thu Jun 10 00:24:13 2021 +0200
Maded struct camelcase
---
src/setu/gnunet-service-setu.c | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 3e24dfe0f..a45531684 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -828,7 +828,7 @@ enum MESSAGE_TYPE
* Struct to tracked messages in message controll flow
*/
-struct message_control_flow_element
+struct messageControlFlowElement
{
enum MESSAGE_CONTROL_FLOW_STATE offer;
enum MESSAGE_CONTROL_FLOW_STATE demand;
@@ -1177,16 +1177,13 @@ update_message_control_flow (struct
GNUNET_CONTAINER_MultiHashMap *hash_map,
const struct GNUNET_HashCode *hash_code,
enum MESSAGE_TYPE mt)
{
- struct message_control_flow_element *cfe = NULL;
+ struct messageControlFlowElement *cfe = NULL;
enum MESSAGE_CONTROL_FLOW_STATE *mcfs;
- uint8_t free_cfe = GNUNET_NO;
cfe = GNUNET_CONTAINER_multihashmap_get (hash_map, hash_code);
if (NULL == cfe)
{
- cfe = (struct message_control_flow_element*) GNUNET_malloc (sizeof(struct
-
message_control_flow_element));
- free_cfe = GNUNET_YES;
+ cfe = GNUNET_new (struct messageControlFlowElement);
}
if (OFFER_MESSAGE == mt)
{
@@ -1201,8 +1198,6 @@ update_message_control_flow (struct
GNUNET_CONTAINER_MultiHashMap *hash_map,
mcfs = &cfe->element;
if ((new_mcfs != MESSAGE_SENT) && (MESSAGE_RECEIVED != cfe->offer) )
{
- if(GNUNET_YES == free_cfe)
- GNUNET_free(cfe);
LOG (GNUNET_ERROR_TYPE_ERROR,
"Received an element without sent offer!\n");
return GNUNET_NO;
@@ -1210,8 +1205,6 @@ update_message_control_flow (struct
GNUNET_CONTAINER_MultiHashMap *hash_map,
/* Check that only requested elements are received! */
if ((new_mcfs != MESSAGE_SENT) && (cfe->demand != MESSAGE_SENT) )
{
- if(GNUNET_YES == free_cfe)
- GNUNET_free(cfe);
LOG (GNUNET_ERROR_TYPE_ERROR,
"Received an element that was not demanded\n");
return GNUNET_NO;
@@ -1219,15 +1212,11 @@ update_message_control_flow (struct
GNUNET_CONTAINER_MultiHashMap *hash_map,
}
else
{
- if(GNUNET_YES == free_cfe)
- GNUNET_free(cfe);
- return GNUNET_SYSERR;
+ return GNUNET_SYSERR;
}
if (new_mcfs <= *mcfs)
{
- if(GNUNET_YES == free_cfe)
- GNUNET_free(cfe);
return GNUNET_NO;
}
@@ -1251,14 +1240,14 @@ is_message_in_message_control_flow (struct
struct GNUNET_HashCode *hash_code,
enum MESSAGE_TYPE mt)
{
- struct message_control_flow_element *cfe = NULL;
+ struct messageControlFlowElement *cfe = NULL;
enum MESSAGE_CONTROL_FLOW_STATE *mcfs;
cfe = GNUNET_CONTAINER_multihashmap_get (hash_map, hash_code);
if (NULL == cfe)
{
- cfe = (struct message_control_flow_element*) GNUNET_malloc (sizeof(struct
-
message_control_flow_element));
+ cfe = (struct messageControlFlowElement*) GNUNET_malloc (sizeof(struct
+
messageControlFlowElement));
}
if (OFFER_MESSAGE == mt)
@@ -1300,7 +1289,7 @@ determinate_done_message_iterator (void *cls,
const struct GNUNET_HashCode *key,
void *value)
{
- struct message_control_flow_element *mcfe = value;
+ struct messageControlFlowElement *mcfe = value;
if (((mcfe->element == MESSAGE_SENT) || (mcfe->element == MESSAGE_RECEIVED)
))
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 119/164: Added some security checks, (continued)
- [gnunet] 119/164: Added some security checks, gnunet, 2021/07/30
- [gnunet] 143/164: Added some comments, gnunet, 2021/07/30
- [gnunet] 139/164: Fixed wrong argument for mode of operation, gnunet, 2021/07/30
- [gnunet] 80/164: Perf test, gnunet, 2021/07/30
- [gnunet] 84/164: Perf test, gnunet, 2021/07/30
- [gnunet] 110/164: Improved IBF with salt + prime ibf size, gnunet, 2021/07/30
- [gnunet] 113/164: Salt mul 7 for salt optimization, gnunet, 2021/07/30
- [gnunet] 117/164: Prepare fore messurement 4, gnunet, 2021/07/30
- [gnunet] 109/164: Added multi strata estimator, gnunet, 2021/07/30
- [gnunet] 130/164: Cleaned some more warnings, gnunet, 2021/07/30
- [gnunet] 142/164: Maded struct camelcase,
gnunet <=
- [gnunet] 124/164: Fixed some bug, gnunet, 2021/07/30
- [gnunet] 144/164: Fixed mem leak, gnunet, 2021/07/30
- [gnunet] 133/164: Removed some unneseray padding from inquery message, gnunet, 2021/07/30
- [gnunet] 149/164: Restored normal config, gnunet, 2021/07/30
- [gnunet] 157/164: Fixed one more bug ;-), gnunet, 2021/07/30
- [gnunet] 158/164: removed exponation from plausability check, gnunet, 2021/07/30
- [gnunet] 162/164: Iproved ibf counter packing code, gnunet, 2021/07/30
- [gnunet] 127/164: Liniting, gnunet, 2021/07/30
- [gnunet] 125/164: Removed unusable counter, gnunet, 2021/07/30
- [gnunet] 122/164: Improved code and commtents, gnunet, 2021/07/30