From 240091007e4aa56fa36edb62f526b0d390879d95 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 18 Jun 2016 21:20:00 +0000 Subject: -indentation and comments --- src/consensus/consensus_api.c | 2 +- src/conversation/conversation_api_call.c | 4 ++-- src/include/gnunet_mq_lib.h | 24 ++++++++++++------------ src/include/gnunet_peerstore_service.h | 2 +- src/include/gnunet_secretsharing_service.h | 16 +++++++++------- src/namestore/test_plugin_namestore_flat.conf | 2 +- 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c index 2a634bdd2..16096c28c 100644 --- a/src/consensus/consensus_api.c +++ b/src/consensus/consensus_api.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2012 GNUnet e.V. + Copyright (C) 2012, 2016 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff --git a/src/conversation/conversation_api_call.c b/src/conversation/conversation_api_call.c index 51b07b7c8..4813faffd 100644 --- a/src/conversation/conversation_api_call.c +++ b/src/conversation/conversation_api_call.c @@ -547,8 +547,6 @@ GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CONVERSATION_CallEventHandler event_handler, void *event_handler_cls) { - struct GNUNET_CONVERSATION_Call *call - = GNUNET_new (struct GNUNET_CONVERSATION_Call); GNUNET_MQ_hd_fixed_size (call_suspend, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND, struct ClientPhoneSuspendMessage); @@ -564,6 +562,8 @@ GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_MQ_hd_var_size (call_audio, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO, struct ClientAudioMessage); + struct GNUNET_CONVERSATION_Call *call + = GNUNET_new (struct GNUNET_CONVERSATION_Call); struct GNUNET_MQ_MessageHandler handlers[] = { make_call_suspend_handler (call), make_call_resume_handler (call), diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index 38ebf6b17..4630fa35a 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h @@ -268,12 +268,12 @@ struct GNUNET_MQ_MessageHandler /** * Callback to validate a message of the specified @e type. * The closure given to @e mv will be this struct (not @e ctx). - * Using NULL means only size-validation using + * Using NULL means only size-validation using * @e expected_size. In this case, @e expected_size must * be non-zero. */ GNUNET_MQ_MessageValidationCallback mv; - + /** * Callback, called every time a new message of * the specified @e type has been receied. @@ -285,7 +285,7 @@ struct GNUNET_MQ_MessageHandler * Closure for @e mv and @e cb. */ void *cls; - + /** * Type of the message this handler covers, in host byte order. */ @@ -317,14 +317,14 @@ struct GNUNET_MQ_MessageHandler * The macro is to be used as follows: * * struct GNUNET_MessageTest { ... }; // must be fixed size - * GNUNET_MQ_hd_fixed_size(test_message, - * GNUNET_MESSAGE_TYPE_TEST, - * struct GNUNET_MessageTest); * static void - * handle_test_message (void *cls, // the struct GNUNET_MQ_MessageHandler + * handle_test_message (void *cls, * const struct GNUNET_MessageTest *msg) * { ... } - * + * + * GNUNET_MQ_hd_fixed_size(test_message, + * GNUNET_MESSAGE_TYPE_TEST, + * struct GNUNET_MessageTest); * struct GNUNET_MQ_MessageHandler handlers[] = { * make_test_message_handler (), * GNUNET_MQ_handler_end() @@ -355,8 +355,8 @@ struct GNUNET_MQ_MessageHandler * The macro is to be used as follows: * * struct GNUNET_MessageTest { ... }; // can be variable size - * GNUNET_MQ_hd_var_size(test_message, - * GNUNET_MESSAGE_TYPE_TEST, + * GNUNET_MQ_hd_var_size(test_message, + * GNUNET_MESSAGE_TYPE_TEST, * struct GNUNET_MessageTest); * static int * check_test (void *cls, @@ -373,8 +373,8 @@ struct GNUNET_MQ_MessageHandler * const char *ctx = cls; * GNUNET_assert (0 == strcmp ("context", ctx)); * // ... - * } - * + * } + * * struct GNUNET_MQ_MessageHandler handlers[] = { * make_test_message_handler ("context"), * GNUNET_MQ_handler_end() diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h index 97d3a3828..202e0fd1a 100644 --- a/src/include/gnunet_peerstore_service.h +++ b/src/include/gnunet_peerstore_service.h @@ -34,7 +34,6 @@ #define GNUNET_PEERSTORE_SERVICE_H #include "gnunet_util_lib.h" -#include "gnunet_common.h" #ifdef __cplusplus extern "C" @@ -139,6 +138,7 @@ typedef void const struct GNUNET_PEERSTORE_Record *record, const char *emsg); + /** * Connect to the PEERSTORE service. * diff --git a/src/include/gnunet_secretsharing_service.h b/src/include/gnunet_secretsharing_service.h index 047120e27..f77fd33d2 100644 --- a/src/include/gnunet_secretsharing_service.h +++ b/src/include/gnunet_secretsharing_service.h @@ -168,11 +168,12 @@ struct GNUNET_SECRETSHARING_Plaintext * @param ready_peers peers that successfuly participated in establishing * the shared secret */ -typedef void (*GNUNET_SECRETSHARING_SecretReadyCallback) (void *cls, - struct GNUNET_SECRETSHARING_Share *my_share, - struct GNUNET_SECRETSHARING_PublicKey *public_key, - unsigned int num_ready_peers, - struct GNUNET_PeerIdentity *ready_peers); +typedef void +(*GNUNET_SECRETSHARING_SecretReadyCallback) (void *cls, + struct GNUNET_SECRETSHARING_Share *my_share, + struct GNUNET_SECRETSHARING_PublicKey *public_key, + unsigned int num_ready_peers, + const struct GNUNET_PeerIdentity *ready_peers); /** @@ -182,8 +183,9 @@ typedef void (*GNUNET_SECRETSHARING_SecretReadyCallback) (void *cls, * @param data decrypted value * @param data_size number of bytes in @a data */ -typedef void (*GNUNET_SECRETSHARING_DecryptCallback) (void *cls, - const struct GNUNET_SECRETSHARING_Plaintext *plaintext); +typedef void +(*GNUNET_SECRETSHARING_DecryptCallback) (void *cls, + const struct GNUNET_SECRETSHARING_Plaintext *plaintext); /** diff --git a/src/namestore/test_plugin_namestore_flat.conf b/src/namestore/test_plugin_namestore_flat.conf index 1c78093c1..3639ce33e 100644 --- a/src/namestore/test_plugin_namestore_flat.conf +++ b/src/namestore/test_plugin_namestore_flat.conf @@ -2,4 +2,4 @@ FILENAME = /tmp/gnunet-test-plugin-namestore-sqlite/flatdb [namestore] -PREFIX = valgrind --log-file=/home/schanzen/dev/gnunet/src/namestore/vg_log +# PREFIX = valgrind --log-file=/home/schanzen/dev/gnunet/src/namestore/vg_log -- cgit v1.2.3