diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-29 10:19:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-29 10:19:43 +0000 |
commit | cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb (patch) | |
tree | b704e00a3af618b2cd174a7f89514eaebd82a1cf | |
parent | bb4fc4f4007988874f910d4de5492f9629301641 (diff) |
run indent twice, it alternates between two 'canonical' forms, also run whitespace remover
169 files changed, 1117 insertions, 1116 deletions
diff --git a/pre-commit b/pre-commit index da86ca59cc..ed24552373 100755 --- a/pre-commit +++ b/pre-commit @@ -1,6 +1,10 @@ #!/bin/sh find src/ -name "*.c" -exec indent {} \; find src/ -name "*.h" -exec indent {} \; +find src/ -name "*.c" -exec indent {} \; +find src/ -name "*.h" -exec indent {} \; +find src/ -name "*.c" -exec contrib/removetrailingwhitespace {} \; +find src/ -name "*.h" -exec contrib/removetrailingwhitespace {} \; if test -x "`which 'dos2unix'`" then find src/ -name "*.c" -exec dos2unix {} \; diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index e85b2eb129..eb19776e63 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c @@ -103,12 +103,12 @@ struct ServiceList time_t mtime; /** - * Process exponential backoff time + * Process exponential backoff time */ struct GNUNET_TIME_Relative backoff; /** - * Absolute time at which the process is scheduled to restart in case of death + * Absolute time at which the process is scheduled to restart in case of death */ struct GNUNET_TIME_Absolute restartAt; @@ -631,8 +631,8 @@ clean_up_running () /** - * We are done with everything. Stop remaining - * tasks, signal handler and the server. + * We are done with everything. Stop remaining + * tasks, signal handler and the server. */ static void do_shutdown () @@ -743,7 +743,7 @@ delayed_restart_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Task triggered whenever we receive a SIGCHLD (child - * process died). + * process died). * * @param cls closure, NULL if we need to self-restart * @param tc context diff --git a/src/arm/gnunet-service-arm.h b/src/arm/gnunet-service-arm.h index e8d125b926..689f26c82b 100644 --- a/src/arm/gnunet-service-arm.h +++ b/src/arm/gnunet-service-arm.h @@ -31,7 +31,7 @@ * Start the specified service. * * @param client who is asking for this - * @param servicename name of the service to start + * @param servicename name of the service to start * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL * @return GNUNET_OK on success */ @@ -41,7 +41,7 @@ start_service (struct GNUNET_SERVER_Client *client, const char *servicename, /** * Stop listening for connections to a service. - * + * * @param serviceName name of service to stop listening for * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were * not listening diff --git a/src/arm/gnunet-service-arm_interceptor.c b/src/arm/gnunet-service-arm_interceptor.c index 59f8ac30b2..837f67d4d4 100644 --- a/src/arm/gnunet-service-arm_interceptor.c +++ b/src/arm/gnunet-service-arm_interceptor.c @@ -21,7 +21,7 @@ * @file arm/gnunet-service-arm_interceptor.c * @brief listen to incoming connections from clients to services, * start services for which incoming an incoming connection occur, - * and relay communication between the client and the service for + * and relay communication between the client and the service for * that first incoming connection. * * @author Safey Abdel Halim @@ -228,7 +228,7 @@ static struct ServiceListeningInfo *serviceListeningInfoList_tail; /** * Put the default services represented by a space separated string into an array of strings - * + * * @param services space separated string of default services */ static void @@ -264,7 +264,7 @@ addDefaultServicesToList (const char *services) /** * Checks whether the serviceName is in the list of default services - * + * * @param serviceName string to check its existance in the list * @return GNUNET_YES if the service is started by default */ @@ -283,7 +283,7 @@ isInDefaultList (const char *serviceName) /** * Close forwarded connection (partial or full). * - * @param fc connection to close + * @param fc connection to close * @param reason which direction to close */ static void @@ -352,9 +352,9 @@ closeClientAndServiceSockets (struct ForwardedConnection *fc, int reason) /** * Read data from the client and then forward it to the service. - * + * * @param cls callback data, struct ForwardedConnection for the communication between client and service - * @param tc context + * @param tc context */ static void receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); @@ -362,7 +362,7 @@ receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); /** * Receive service messages sent by the service and forward it to client - * + * * @param cls callback data, struct ForwardedConnection for the communication between client and service * @param tc scheduler context */ @@ -380,7 +380,7 @@ start_forwarding (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); /** * Forward messages sent from service to client - * + * * @param cls callback data, struct ForwardedConnection for the communication between client and service * @param tc context */ @@ -437,7 +437,7 @@ forwardToClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Receive service messages sent by the service and forward it to client - * + * * @param cls callback data, struct ForwardedConnection for the communication between client and service * @param tc scheduler context */ @@ -531,7 +531,7 @@ receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Forward client message to service - * + * * @param cls callback data, struct ForwardedConnection for the communication between client and service * @param tc scheduler context */ @@ -626,9 +626,9 @@ forwardToService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Read data from the client and then forward it to the service. - * + * * @param cls callback data, struct ForwardedConnection for the communication between client and service - * @param tc context + * @param tc context */ static void receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) @@ -907,9 +907,9 @@ stop_listening (const char *serviceName) /** * First connection has come to the listening socket associated with the service, * create the service in order to relay the incoming connection to it - * + * * @param cls callback data, struct ServiceListeningInfo describing a listen socket - * @param tc context + * @param tc context */ static void acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); @@ -970,9 +970,9 @@ accept_and_forward (struct ServiceListeningInfo *serviceListeningInfo) /** * First connection has come to the listening socket associated with the service, * create the service in order to relay the incoming connection to it - * + * * @param cls callback data, struct ServiceListeningInfo describing a listen socket - * @param tc context + * @param tc context */ static void acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) @@ -1042,7 +1042,7 @@ acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Creating a listening socket for each of the service's addresses and * wait for the first incoming connection to it - * + * * @param sa address associated with the service * @param addr_len length of sa * @param serviceName the name of the service in question @@ -1132,7 +1132,7 @@ createListeningSocket (struct sockaddr *sa, socklen_t addr_len, /** * Callback function, checks whether the current tokens are representing a service, * gets its addresses and create listening socket for it. - * + * * @param cls callback data, not used * @param section configuration section * @param option configuration option diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c index 4f791050d2..42c2f99a4c 100644 --- a/src/ats/ats_api.c +++ b/src/ats/ats_api.c @@ -165,7 +165,7 @@ struct GNUNET_ATS_Handle * * @param cls pointer to counter * @param key identity of the peer associated with the records - * @param value a 'struct AllocationRecord' + * @param value a 'struct AllocationRecord' * @return GNUNET_YES (continue iteration) */ static int @@ -202,7 +202,7 @@ struct SetBandwidthContext * * @param cls 'struct SetBandwidthContext' * @param key identity of the peer associated with the records - * @param value a 'struct AllocationRecord' + * @param value a 'struct AllocationRecord' * @return GNUNET_YES (continue iteration) */ static int @@ -285,8 +285,7 @@ suggest_address (void *cls, const GNUNET_HashCode * key, void *value) /* trivial strategy: pick first available address... */ asc->cb (asc->cb_cls, &asc->target, ar->plugin_name, ar->plugin_addr, - ar->plugin_addr_len, - ar->session, + ar->plugin_addr_len, ar->session, GNUNET_BANDWIDTH_value_init (asc->atc->total_bps / 32), ar->ats, ar->ats_count); asc->cb = NULL; @@ -437,8 +436,8 @@ struct UpdateSessionContext * * @param cls a new 'struct AllocationRecord' * @param key identity of the peer associated with the records - * @param value the old 'struct AllocationRecord' - * @return GNUNET_YES if the records do not match, + * @param value the old 'struct AllocationRecord' + * @return GNUNET_YES if the records do not match, * GNUNET_NO if the record do match and 'old' was updated */ static int @@ -682,8 +681,7 @@ notify_valid (void *cls, const GNUNET_HashCode * key, void *value) struct GNUNET_ATS_SuggestionContext *asc = value; asc->cb (asc->cb_cls, &asc->target, ar->plugin_name, ar->plugin_addr, - ar->plugin_addr_len, - ar->session, + ar->plugin_addr_len, ar->session, GNUNET_BANDWIDTH_value_init (asc->atc->total_bps / 32), ar->ats, ar->ats_count); GNUNET_ATS_suggest_address_cancel (asc); diff --git a/src/block/block.c b/src/block/block.c index ac466337c8..238334b661 100644 --- a/src/block/block.c +++ b/src/block/block.c @@ -66,7 +66,7 @@ struct GNUNET_BLOCK_Context /** * Mingle hash with the mingle_number to produce different bits. - * + * * @param in original hash code * @param mingle_number number for hash permutation * @param hc where to store the result. @@ -192,7 +192,7 @@ find_plugin (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type) /** * Function called to validate a reply or a request. For * request evaluation, simply pass "NULL" for the reply_block. - * Note that it is assumed that the reply has already been + * Note that it is assumed that the reply has already been * matched to the key (and signatures checked) as it would * be done with the "get_key" function. * diff --git a/src/block/plugin_block_fs.c b/src/block/plugin_block_fs.c index 627f21a108..f9bf4e36e5 100644 --- a/src/block/plugin_block_fs.c +++ b/src/block/plugin_block_fs.c @@ -40,7 +40,7 @@ /** * Function called to validate a reply or a request. For * request evaluation, simply pass "NULL" for the reply_block. - * Note that it is assumed that the reply has already been + * Note that it is assumed that the reply has already been * matched to the key (and signatures checked) as it would * be done with the "get_key" function. * diff --git a/src/chat/chat.c b/src/chat/chat.c index fb47b6c157..b51d29b9c7 100644 --- a/src/chat/chat.c +++ b/src/chat/chat.c @@ -626,7 +626,7 @@ GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room) * @param room_name name of the room * @param msg_options message options of the joining user * @param joinCallback function to call on successful join - * @param join_cls closure for joinCallback + * @param join_cls closure for joinCallback * @param messageCallback which function to call if a message has * been received? * @param message_cls argument to callback diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c index e04d8d0994..c41ec90953 100644 --- a/src/chat/gnunet-service-chat.c +++ b/src/chat/gnunet-service-chat.c @@ -20,7 +20,7 @@ /** * @file chat/gnunet-service-chat.c - * @brief service providing chat functionality + * @brief service providing chat functionality * @author Christian Grothoff * @author Vitaly Minko */ diff --git a/src/core/core.h b/src/core/core.h index 53d1a1b6d7..37580bb826 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -378,7 +378,7 @@ struct SendMessageRequest /** - * Core notifying client that it is allowed to now + * Core notifying client that it is allowed to now * transmit a message to the given target * (response to GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST). */ @@ -390,9 +390,9 @@ struct SendMessageReady struct GNUNET_MessageHeader header; /** - * How many bytes are allowed for transmission? + * How many bytes are allowed for transmission? * Guaranteed to be at least as big as the requested size, - * or ZERO if the request is rejected (will timeout, + * or ZERO if the request is rejected (will timeout, * peer disconnected, queue full, etc.). */ uint16_t size GNUNET_PACKED; diff --git a/src/core/core_api.c b/src/core/core_api.c index 27754010a0..30c86d0d93 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -39,14 +39,14 @@ struct PeerRecord /** * We generally do NOT keep peer records in a DLL; this * DLL is only used IF this peer's 'pending_head' message - * is ready for transmission. + * is ready for transmission. */ struct PeerRecord *prev; /** * We generally do NOT keep peer records in a DLL; this * DLL is only used IF this peer's 'pending_head' message - * is ready for transmission. + * is ready for transmission. */ struct PeerRecord *next; @@ -98,7 +98,7 @@ struct PeerRecord /** * ID of timeout task for the 'pending_head' handle - * which is the one with the smallest timeout. + * which is the one with the smallest timeout. */ GNUNET_SCHEDULER_TaskIdentifier timeout_task; @@ -124,7 +124,7 @@ struct PeerRecord * Entry in a doubly-linked list of control messages to be transmitted * to the core service. Control messages include traffic allocation, * connection requests and of course our initial 'init' request. - * + * * The actual message is allocated at the end of this struct. */ struct ControlMessage @@ -319,7 +319,7 @@ struct GNUNET_CORE_TransmitHandle struct PeerRecord *peer; /** - * Corresponding SEND_REQUEST message. Only non-NULL + * Corresponding SEND_REQUEST message. Only non-NULL * while SEND_REQUEST message is pending. */ struct ControlMessage *cm; @@ -396,7 +396,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Notify clients about disconnect and free + * Notify clients about disconnect and free * the entry for connected peer. * * @param cls the 'struct GNUNET_CORE_Handle*' @@ -1393,7 +1393,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, /** - * Disconnect from the core service. This function can only + * Disconnect from the core service. This function can only * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' * requests have been explicitly canceled. * @@ -1883,7 +1883,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, /** * Cancel request for getting information about a peer. * Note that an eventual change in preference, trust or bandwidth - * assignment MAY have already been committed at the time, + * assignment MAY have already been committed at the time, * so cancelling a request is NOT sure to undo the original * request. The original request may or may not still commit. * The only thing cancellation ensures is that the callback diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 7385991a22..1b8bb630cc 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -71,7 +71,7 @@ /** * After how much time past the "official" expiration time do - * we discard messages? Should not be zero since we may + * we discard messages? Should not be zero since we may * intentionally defer transmission until close to the deadline * and then may be slightly past the deadline due to inaccuracy * in sleep and our own CPU consumption. @@ -410,7 +410,7 @@ struct MessageEntry /** - * Record kept for each request for transmission issued by a + * Record kept for each request for transmission issued by a * client that is still pending. */ struct ClientActiveRequest; @@ -439,13 +439,13 @@ struct Neighbour struct MessageEntry *encrypted_tail; /** - * Head of list of requests from clients for transmission to + * Head of list of requests from clients for transmission to * this peer. */ struct ClientActiveRequest *active_client_request_head; /** - * Tail of list of requests from clients for transmission to + * Tail of list of requests from clients for transmission to * this peer. */ struct ClientActiveRequest *active_client_request_tail; @@ -684,7 +684,7 @@ struct Client /** - * Record kept for each request for transmission issued by a + * Record kept for each request for transmission issued by a * client that is still pending. */ struct ClientActiveRequest @@ -962,10 +962,10 @@ send_to_client (struct Client *client, const struct GNUNET_MessageHeader *msg, /** * Send a message to all of our current clients that have * the right options set. - * + * * @param msg message to multicast * @param can_drop can this message be discarded if the queue is too long - * @param options mask to use + * @param options mask to use */ static void send_to_all_clients (const struct GNUNET_MessageHeader *msg, int can_drop, @@ -1225,7 +1225,7 @@ handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client, (n->status != PEER_STATE_KEY_CONFIRMED)) { /* neighbour must have disconnected since request was issued, - * ignore (client will realize it once it processes the + * ignore (client will realize it once it processes the * disconnect notification) */ #if DEBUG_CORE_CLIENT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -1705,7 +1705,7 @@ handle_client_request_info (void *cls, struct GNUNET_SERVER_Client *client, else { /* Technically, this COULD happen (due to asynchronous behavior), - * but it should be rare, so we should generate an info event + * but it should be rare, so we should generate an info event * to help diagnosis of serious errors that might be masked by this */ GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ @@ -1860,7 +1860,7 @@ consider_free_neighbour (struct Neighbour *n); /** - * Task triggered when a neighbour entry is about to time out + * Task triggered when a neighbour entry is about to time out * (and we should prevent this by sending a PING). * * @param cls the 'struct Neighbour' @@ -2733,7 +2733,7 @@ process_plaintext_neighbour_queue (struct Neighbour *n) /** * Function that recalculates the bandwidth quota for the * given neighbour and transmits it to the transport service. - * + * * @param cls neighbour for the quota update * @param tc context */ @@ -2850,7 +2850,7 @@ handle_client_send (void *cls, struct GNUNET_SERVER_Client *client, if ((n == NULL) || (GNUNET_YES != n->is_connected) || (n->status != PEER_STATE_KEY_CONFIRMED)) { - /* attempt to send message to peer that is not connected anymore + /* attempt to send message to peer that is not connected anymore * (can happen due to asynchrony) */ GNUNET_STATISTICS_update (stats, gettext_noop @@ -4256,7 +4256,7 @@ handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer, /** * Function that recalculates the bandwidth quota for the * given neighbour and transmits it to the transport service. - * + * * @param cls neighbour for the quota update * @param tc context */ @@ -4283,7 +4283,7 @@ neighbour_quota_update (void *cls, n->quota_update_task = GNUNET_SCHEDULER_NO_TASK; /* calculate relative preference among all neighbours; * divides by a bit more to avoid division by zero AND to - * account for possibility of new neighbours joining any time + * account for possibility of new neighbours joining any time * AND to convert to double... */ neighbour_count = GNUNET_CONTAINER_multihashmap_size (neighbours); if (neighbour_count == 0) diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c index 9d12fbc3e8..26402362b1 100644 --- a/src/datacache/datacache.c +++ b/src/datacache/datacache.c @@ -92,7 +92,7 @@ struct GNUNET_DATACACHE_Handle /** * Function called by plugins to notify the datacache * about content deletions. - * + * * @param cls closure * @param key key of the content that was deleted * @param size number of bytes that were made available diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c index 62787eea60..b9954faf94 100644 --- a/src/datacache/plugin_datacache_mysql.c +++ b/src/datacache/plugin_datacache_mysql.c @@ -877,7 +877,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key, /** * Delete the entry with the lowest expiration value * from the datacache right now. - * + * * @param cls closure (our "struct Plugin") * @return GNUNET_OK on success, GNUNET_SYSERR on error */ diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index c5730078a0..0f7dd8904b 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c @@ -57,7 +57,7 @@ struct Plugin * Check if the result obtained from Postgres has * the desired status code. If not, log an error, clear the * result and return GNUNET_SYSERR. - * + * * @return GNUNET_OK if the result is acceptable */ static int @@ -416,7 +416,7 @@ postgres_plugin_get (void *cls, const GNUNET_HashCode * key, /** * Delete the entry with the lowest expiration value * from the datacache right now. - * + * * @param cls closure (our "struct Plugin") * @return GNUNET_OK on success, GNUNET_SYSERR on error */ diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c index 3d67ffc22b..369e8c1013 100644 --- a/src/datacache/plugin_datacache_sqlite.c +++ b/src/datacache/plugin_datacache_sqlite.c @@ -267,7 +267,7 @@ sqlite_plugin_get (void *cls, const GNUNET_HashCode * key, /** * Delete the entry with the lowest expiration value * from the datacache right now. - * + * * @param cls closure (our "struct Plugin") * @return GNUNET_OK on success, GNUNET_SYSERR on error */ diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c index 046c603ada..2d3f160e4f 100644 --- a/src/datacache/plugin_datacache_template.c +++ b/src/datacache/plugin_datacache_template.c @@ -85,7 +85,7 @@ template_plugin_get (void *cls, const GNUNET_HashCode * key, /** * Delete the entry with the lowest expiration value * from the datacache right now. - * + * * @param cls closure (our "struct Plugin") * @return GNUNET_OK on success, GNUNET_SYSERR on error */ diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h index 39a680e423..1dcf7bb4ba 100644 --- a/src/datastore/datastore.h +++ b/src/datastore/datastore.h @@ -103,7 +103,7 @@ struct GetMessage { /** * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size - * can either be "sizeof(struct GetMessage)" or + * can either be "sizeof(struct GetMessage)" or * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! */ struct GNUNET_MessageHeader header; diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 8a8f64eb39..f8826ce667 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c @@ -34,7 +34,7 @@ /** * If a client stopped asking for more results, how many more do * we receive from the DB before killing the connection? Trade-off - * between re-doing TCP handshakes and (needlessly) receiving + * between re-doing TCP handshakes and (needlessly) receiving * useless results. */ #define MAX_EXCESS_RESULTS 8 @@ -163,7 +163,7 @@ struct GNUNET_DATASTORE_QueueEntry /** * Has this message been transmitted to the service? * Only ever GNUNET_YES for the head of the queue. - * Note that the overall struct should end at a + * Note that the overall struct should end at a * multiple of 64 bits. */ int was_transmitted; @@ -171,7 +171,7 @@ struct GNUNET_DATASTORE_QueueEntry }; /** - * Handle to the datastore service. + * Handle to the datastore service. */ struct GNUNET_DATASTORE_Handle { @@ -391,7 +391,7 @@ timeout_queue_entry (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) * @param timeout timeout for the operation * @param response_proc function to call with replies (can be NULL) * @param qc client context (NOT a closure for response_proc) - * @return NULL if the queue is full + * @return NULL if the queue is full */ static struct GNUNET_DATASTORE_QueueEntry * make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, @@ -452,7 +452,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, if ((pos->max_queue < h->queue_size) && (pos->was_transmitted == GNUNET_NO)) { GNUNET_assert (pos->response_proc != NULL); - /* move 'pos' element to head so that it will be + /* move 'pos' element to head so that it will be * killed on 'NULL' call below */ #if DEBUG_DATASTORE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -477,7 +477,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, /** * Process entries in the queue (or do nothing if we are already * doing so). - * + * * @param h handle to the datastore */ static void @@ -637,7 +637,7 @@ transmit_request (void *cls, size_t size, void *buf) /** * Process entries in the queue (or do nothing if we are already * doing so). - * + * * @param h handle to the datastore */ static void @@ -696,7 +696,7 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) * Dummy continuation used to do nothing (but be non-zero). * * @param cls closure - * @param result result + * @param result result * @param emsg error message */ static void @@ -710,7 +710,7 @@ drop_status_cont (void *cls, int32_t result, const char *emsg) * Free a queue entry. Removes the given entry from the * queue and releases associated resources. Does NOT * call the callback. - * + * * @param qe entry to free. */ static void @@ -1478,7 +1478,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, /** * Cancel a datastore operation. The final callback from the * operation must not have been done yet. - * + * * @param qe operation to cancel */ void diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index d6a0b3c816..29f68d8bb7 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -199,7 +199,7 @@ static struct GNUNET_STATISTICS_Handle *stats; /** - * Synchronize our utilization statistics with the + * Synchronize our utilization statistics with the * statistics service. */ static void @@ -857,7 +857,7 @@ execute_put (struct GNUNET_SERVER_Client *client, const struct DataMessage *dm) * maybe 0 if no unique identifier is available * * @return GNUNET_OK usually - * GNUNET_NO to delete the item + * GNUNET_NO to delete the item */ static int check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, @@ -1214,7 +1214,7 @@ handle_drop (void *cls, struct GNUNET_SERVER_Client *client, * change in their disk utilization. * * @param cls closure (NULL) - * @param delta change in disk utilization, + * @param delta change in disk utilization, * 0 for "reset to empty" */ static void diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 36dc846560..ac3be4d5cf 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c @@ -90,7 +90,7 @@ struct CpsRunContext * change in their disk utilization. * * @param cls closure (NULL) - * @param delta change in disk utilization, + * @param delta change in disk utilization, * 0 for "reset to empty" */ static void diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c index d6b6d6c623..0448b72994 100644 --- a/src/datastore/plugin_datastore_mysql.c +++ b/src/datastore/plugin_datastore_mysql.c @@ -331,7 +331,7 @@ get_my_cnf_path (const struct GNUNET_CONFIGURATION_Handle *cfg) /** * Close database connection and all prepared statements (we got a DB * disconnect error). - * + * * @param plugin plugin context */ static int @@ -1025,7 +1025,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MysqlStatementHandle *stmt, * Get one of the results for a particular key in the datastore. * * @param cls closure - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param key key to match, never NULL * @param vhash hash of the value, maybe NULL (to @@ -1035,7 +1035,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MysqlStatementHandle *stmt, * there may be! * @param type entries of which type are relevant? * Use 0 for any type. - * @param proc function to call on the matching value, + * @param proc function to call on the matching value, * with NULL for if no value matches * @param proc_cls closure for proc */ diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index d71d5e0efb..4e44107b60 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c @@ -65,7 +65,7 @@ struct Plugin * Check if the result obtained from Postgres has * the desired status code. If not, log an error, clear the * result and return GNUNET_SYSERR. - * + * * @param plugin global context * @param ret result to check * @param expected_status expected return value @@ -582,7 +582,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc, * in the datastore. * * @param cls closure - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param key maybe NULL (to match all entries) * @param vhash hash of the value, maybe NULL (to @@ -822,7 +822,7 @@ repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, /** * Get a random item for replication. Returns a single, not expired, random item - * from those with the highest replication counters. The item's + * from those with the highest replication counters. The item's * replication counter is decremented by one IF it was positive before. * Call 'proc' with all values ZERO or NULL if the datastore is empty. * diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 46486d9337..4a66c44ca3 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c @@ -1,17 +1,17 @@ /* * This file is part of GNUnet * (C) 2009, 2011 Christian Grothoff (and other contributing authors) - * + * * GNUnet is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 3, or (at your * option) any later version. - * + * * GNUnet is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNUnet; see the file COPYING. If not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -157,7 +157,7 @@ sq_prepare (sqlite3 * dbh, const char *zSql, sqlite3_stmt ** ppStmt) /** * Create our database indices. - * + * * @param dbh handle to the database */ static void @@ -724,7 +724,7 @@ execute_get (struct Plugin *plugin, sqlite3_stmt * stmt, * the given processor for the item. * * @param cls our plugin context - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param type entries of which type should be considered? * Use 0 for any type. @@ -947,7 +947,7 @@ repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, /** * Get a random item for replication. Returns a single random item - * from those with the highest replication counters. The item's + * from those with the highest replication counters. The item's * replication counter is decremented by one IF it was positive before. * Call 'proc' with all values ZERO or NULL if the datastore is empty. * diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c index 566155fb50..174d3d2554 100644 --- a/src/datastore/plugin_datastore_template.c +++ b/src/datastore/plugin_datastore_template.c @@ -87,7 +87,7 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, * Get one of the results for a particular key in the datastore. * * @param cls closure - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param key maybe NULL (to match all entries) * @param vhash hash of the value, maybe NULL (to @@ -185,7 +185,7 @@ template_plugin_update (void *cls, uint64_t uid, int delta, * Call the given processor on an item with zero anonymity. * * @param cls our "struct Plugin*" - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param type entries of which type should be considered? * Use 0 for any type. diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c index 3a924c7b6b..373e8f453d 100644 --- a/src/datastore/test_plugin_datastore.c +++ b/src/datastore/test_plugin_datastore.c @@ -74,7 +74,7 @@ struct CpsRunContext * change in their disk utilization. * * @param cls closure (NULL) - * @param delta change in disk utilization, + * @param delta change in disk utilization, * 0 for "reset to empty" */ static void diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 43a6c9bea0..cbeecb5cc1 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c @@ -1281,7 +1281,7 @@ distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have) * two numbers being identical; furthermore, we need to * guarantee that a difference in the number of matching * bits is always represented in the result. - * + * * We use 2^32/2^9 numerical values to distinguish between * hash codes that have the same LSB bit distance and * use the highest 2^9 bits of the result to signify the diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 779aff88d6..47d78ef402 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c @@ -60,7 +60,7 @@ struct TestPutContext { /** - * This is a linked list + * This is a linked list */ struct TestPutContext *next; diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index bd4dfba5a5..6246163a69 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c @@ -192,7 +192,7 @@ struct GNUNET_DEFRAGMENT_Context * Create a defragmentation context. * * @param stats statistics context - * @param mtu the maximum message size for each fragment + * @param mtu the maximum message size for each fragment * @param num_msgs how many fragmented messages * to we defragment at most at the same time? * @param cls closure for proc and ackp diff --git a/src/fs/fs.c b/src/fs/fs.c index fc1388a04f..93971075ab 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c @@ -213,7 +213,7 @@ GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf, /** * Destroy a top-level activity entry. - * + * * @param h global fs handle * @param top top level activity entry */ @@ -250,7 +250,7 @@ struct FileInfo * @param offset offset to read from; it is possible * that the caller might need to go backwards * a bit at times - * @param max maximum number of bytes that should be + * @param max maximum number of bytes that should be * copied to buf; readers are not allowed * to provide less data unless there is an error; * a value of "0" will be used at the end to allow @@ -333,7 +333,7 @@ GNUNET_FS_make_file_reader_context_ (const char *filename) * @param offset offset to read from; it is possible * that the caller might need to go backwards * a bit at times - * @param max maximum number of bytes that should be + * @param max maximum number of bytes that should be * copied to buf; readers are not allowed * to provide less data unless there is an error; * a value of "0" will be used at the end to allow @@ -363,7 +363,7 @@ GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, void *buf, * (for serialization/deserialization). * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param ent entity identifier (or emtpy string for the directory) * @return NULL on error */ @@ -394,7 +394,7 @@ get_serialization_file_name (struct GNUNET_FS_Handle *h, const char *ext, * parent operation. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param uni name of the parent operation * @param ent entity identifier (or emtpy string for the directory) * @return NULL on error @@ -424,7 +424,7 @@ get_serialization_file_name_in_dir (struct GNUNET_FS_Handle *h, const char *ext, * Return a read handle for deserialization. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param ent entity identifier (or emtpy string for the directory) * @return NULL on error */ @@ -447,7 +447,7 @@ get_read_handle (struct GNUNET_FS_Handle *h, const char *ext, const char *ent) * Return a write handle for serialization. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param ent entity identifier (or emtpy string for the directory) * @return NULL on error */ @@ -474,7 +474,7 @@ get_write_handle (struct GNUNET_FS_Handle *h, const char *ext, const char *ent) * Return a write handle for serialization. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param uni name of parent * @param ent entity identifier (or emtpy string for the directory) * @return NULL on error @@ -499,8 +499,8 @@ get_write_handle_in_dir (struct GNUNET_FS_Handle *h, const char *ext, * Remove serialization/deserialization file from disk. * * @param h master context - * @param ext component of the path - * @param ent entity identifier + * @param ext component of the path + * @param ent entity identifier */ void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, @@ -527,9 +527,9 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, * Remove serialization/deserialization file from disk. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param uni parent name - * @param ent entity identifier + * @param ent entity identifier */ static void remove_sync_file_in_dir (struct GNUNET_FS_Handle *h, const char *ext, @@ -556,8 +556,8 @@ remove_sync_file_in_dir (struct GNUNET_FS_Handle *h, const char *ext, * Remove serialization/deserialization directory from disk. * * @param h master context - * @param ext component of the path - * @param uni unique name of parent + * @param ext component of the path + * @param uni unique name of parent */ void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, @@ -891,7 +891,7 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename) * Given a serialization name (full absolute path), return the * basename of the file (without the path), which must only * consist of the 6 random characters. - * + * * @param fullname name to extract the basename from * @return copy of the basename, NULL on error */ @@ -926,7 +926,7 @@ get_serialization_short_name (const char *fullname) * is enabled and returns NULL if not. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @return NULL on errror */ static char * @@ -961,7 +961,7 @@ make_serialization_file_name (struct GNUNET_FS_Handle *h, const char *ext) * is enabled and returns NULL if not. * * @param h master context - * @param ext component of the path + * @param ext component of the path * @param uni name of parent * @return NULL on errror */ @@ -1396,7 +1396,7 @@ cleanup: * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param pc the struct to sync */ void @@ -1463,7 +1463,7 @@ cleanup: * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param uc the struct to sync */ void @@ -1516,7 +1516,7 @@ cleanup: /** * Serialize a download request. - * + * * @param wh the 'struct GNUNET_BIO_WriteHandle*' * @param dr the 'struct DownloadRequest' * @return GNUNET_YES on success, GNUNET_NO on error @@ -1545,7 +1545,7 @@ write_download_request (struct GNUNET_BIO_WriteHandle *wh, /** * Read a download request tree. - * + * * @param rh stream to read from * @return value the 'struct DownloadRequest', NULL on error */ @@ -1646,7 +1646,7 @@ get_download_sync_filename (struct GNUNET_FS_DownloadContext *dc, * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param dc the struct to sync */ void @@ -1748,7 +1748,7 @@ cleanup: * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param sr the struct to sync */ void @@ -1825,7 +1825,7 @@ cleanup: * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param sc the struct to sync */ void @@ -2022,7 +2022,7 @@ deserialize_download (struct GNUNET_FS_Handle *h, /** - * Deserialize a search. + * Deserialize a search. * * @param h overall context * @param rh file to deserialize from @@ -2165,7 +2165,7 @@ cleanup: * resume the download (put it in the queue). Does this * recursively for the top-level download and all child * downloads. - * + * * @param dc download to resume */ static void @@ -2511,7 +2511,7 @@ signal_search_resume (struct GNUNET_FS_SearchContext *sc) /** - * Deserialize a search. + * Deserialize a search. * * @param h overall context * @param rh file to deserialize from @@ -2700,7 +2700,7 @@ deserialization_master (const char *master_path, GNUNET_FileNameCallback proc, * Setup a connection to the file-sharing service. * * @param cfg configuration to use - * @param client_name unique identifier for this client + * @param client_name unique identifier for this client * @param upcb function to call to notify about FS actions * @param upcb_cls closure for upcb * @param flags specific attributes for fs-operations diff --git a/src/fs/fs.h b/src/fs/fs.h index 11cfc755ef..1629af8523 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h @@ -465,7 +465,7 @@ struct GNUNET_FS_FileInformation char *emsg; /** - * Name of the file or directory (must be an absolute path). + * Name of the file or directory (must be an absolute path). */ char *filename; @@ -779,7 +779,7 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh); * @param offset offset to read from; it is possible * that the caller might need to go backwards * a bit at times - * @param max maximum number of bytes that should be + * @param max maximum number of bytes that should be * copied to buf; readers are not allowed * to provide less data unless there is an error; * a value of "0" will be used at the end to allow @@ -811,7 +811,7 @@ GNUNET_FS_make_file_reader_context_ (const char *filename); * @param offset offset to read from; it is possible * that the caller might need to go backwards * a bit at times - * @param max maximum number of bytes that should be + * @param max maximum number of bytes that should be * copied to buf; readers are not allowed * to provide less data unless there is an error; * a value of "0" will be used at the end to allow @@ -909,7 +909,7 @@ GNUNET_FS_download_start_task_ (void *cls, /** - * Fill in all of the generic fields for + * Fill in all of the generic fields for * an unindex event and call the callback. * * @param pi structure to fill in @@ -973,8 +973,8 @@ GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); * Remove serialization/deserialization file from disk. * * @param h master context - * @param ext component of the path - * @param ent entity identifier + * @param ext component of the path + * @param ent entity identifier */ void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, @@ -985,8 +985,8 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, * Remove serialization/deserialization directory from disk. * * @param h master context - * @param ext component of the path - * @param uni unique name of parent + * @param ext component of the path + * @param uni unique name of parent */ void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, @@ -998,7 +998,7 @@ GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, * on disk. Note that all internal FS-operations that change * file information data should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param fi the struct to sync */ void @@ -1009,7 +1009,7 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f); * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param pc the struct to sync */ void @@ -1020,7 +1020,7 @@ GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param uc the struct to sync */ void @@ -1031,7 +1031,7 @@ GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc); * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param sc the struct to sync */ void @@ -1042,7 +1042,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc); * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param sr the struct to sync */ void @@ -1053,7 +1053,7 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr); * on disk. Note that all internal FS-operations that change * publishing structs should already call "sync" internally, * so this function is likely not useful for clients. - * + * * @param dc the struct to sync */ void @@ -1147,7 +1147,7 @@ GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf, /** * Destroy a top-level activity entry. - * + * * @param h global fs handle * @param top top level activity entry */ @@ -1660,7 +1660,7 @@ enum BlockRequestState BRS_RECONSTRUCT_UP = 3, /** - * We've determined the real, desired CHK for this block + * We've determined the real, desired CHK for this block * (full tree reconstruction failed), request is now pending. * If the CHK that bubbled up through reconstruction did match * the top-level request, the state machine for the subtree @@ -1672,7 +1672,7 @@ enum BlockRequestState * We've successfully downloaded this block, but the children * still need to be either downloaded or verified (download * request propagates down). If the download fails, the - * state machine for this block may move to + * state machine for this block may move to * BRS_DOWNLOAD_ERROR instead. */ BRS_DOWNLOAD_DOWN = 5, @@ -2127,7 +2127,7 @@ struct IndexStartMessage struct IndexInfoMessage { /** - * Message type will be + * Message type will be * GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY. */ struct GNUNET_MessageHeader header; @@ -2160,7 +2160,7 @@ struct UnindexMessage { /** - * Message type will be + * Message type will be * GNUNET_MESSAGE_TYPE_FS_UNINDEX. */ struct GNUNET_MessageHeader header; @@ -2186,13 +2186,13 @@ struct SearchMessage { /** - * Message type will be + * Message type will be * GNUNET_MESSAGE_TYPE_FS_START_SEARCH. */ struct GNUNET_MessageHeader header; /** - * Bitmask with options. Zero for no options, one for loopback-only. + * Bitmask with options. Zero for no options, one for loopback-only. * Other bits are currently not defined. */ int32_t options GNUNET_PACKED; @@ -2216,7 +2216,7 @@ struct SearchMessage * or similar blunt actions in order to avoid exposing ourselves). * <p> * If the request is for an SBLOCK, this is the identity of the - * pseudonym to which the SBLOCK belongs. + * pseudonym to which the SBLOCK belongs. * <p> * If the request is for a KBLOCK, "target" must be all zeros. */ @@ -2346,7 +2346,7 @@ struct PutMessage uint32_t type GNUNET_PACKED; /** - * When does this result expire? + * When does this result expire? */ struct GNUNET_TIME_AbsoluteNBO expiration; @@ -2362,7 +2362,7 @@ struct PutMessage struct MigrationStopMessage { /** - * Message type will be + * Message type will be * GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP. */ struct GNUNET_MessageHeader header; diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c index 61ed1586f5..f43fe14a71 100644 --- a/src/fs/fs_directory.c +++ b/src/fs/fs_directory.c @@ -72,7 +72,7 @@ GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData /** * Set the MIMETYPE information for the given * metadata to "application/gnunet-directory". - * + * * @param md metadata to add mimetype to */ void @@ -124,7 +124,7 @@ struct GetFullDataClosure * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found @@ -341,7 +341,7 @@ struct GNUNET_FS_DirectoryBuilder /** * Create a directory builder. - * + * * @param mdir metadata for the directory */ struct GNUNET_FS_DirectoryBuilder * @@ -362,7 +362,7 @@ GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData /** * Add an entry to a directory. - * + * * @param bld directory to extend * @param uri uri of the entry (must not be a KSK) * @param md metadata of the entry diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 89de277da6..ba44619860 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c @@ -59,7 +59,7 @@ is_recursive_download (struct GNUNET_FS_DownloadContext *dc) * Given the offset of a block (with respect to the DBLOCKS) and its * depth, return the offset where we would store this block in the * file. - * + * * @param fsize overall file size * @param off offset of the block in the file * @param depth depth of the block in the tree, 0 for DBLOCK @@ -134,8 +134,8 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, /** * We're ready to transmit a search request to the - * file-sharing service. Do it. If there is - * more than one request pending, try to send + * file-sharing service. Do it. If there is + * more than one request pending, try to send * multiple or request another transmission. * * @param cls closure @@ -204,7 +204,7 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key, * We've found a matching block without downloading it. * Encrypt it and pass it to our "receive" function as * if we had received it from the network. - * + * * @param dc download in question * @param chk request this relates to * @param dr request details @@ -543,7 +543,7 @@ try_match_block (struct GNUNET_FS_DownloadContext *dc, * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found @@ -1057,7 +1057,7 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key, dc->completed += app; /* do recursive download if option is set and either meta data - * says it is a directory or if no meta data is given AND filename + * says it is a directory or if no meta data is given AND filename * ends in '.gnd' (top-level case) */ if (is_recursive_download (dc)) GNUNET_FS_directory_list_contents (prc->size, pt, off, @@ -1242,8 +1242,8 @@ receive_results (void *cls, const struct GNUNET_MessageHeader *msg) /** * We're ready to transmit a search request to the - * file-sharing service. Do it. If there is - * more than one request pending, try to send + * file-sharing service. Do it. If there is + * more than one request pending, try to send * multiple or request another transmission. * * @param cls closure @@ -1495,7 +1495,7 @@ deactivate_fs_download (void *cls) * @param depth depth of the current entry, 0 are the DBLOCKs, * top level block is 'dc->treedepth - 1' * @param dr_offset offset in the original file this block maps to - * (as in, offset of the first byte of the first DBLOCK + * (as in, offset of the first byte of the first DBLOCK * in the subtree rooted in the returned download request tree) * @param file_start_offset desired starting offset for the download * in the original file; requesting tree should not contain @@ -1616,7 +1616,7 @@ get_next_block (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) * * This function checks if the content on disk matches * the expected content based on the URI. - * + * * @param cls closure * @param chk content hash key for the block * @param offset offset of the block @@ -1658,7 +1658,7 @@ reconstruct_cb (void *cls, const struct ContentHashKey *chk, uint64_t offset, case BRS_CHK_SET: if (0 == memcmp (chk, &dr->chk, sizeof (struct ContentHashKey))) { - /* block matches, hence tree below matches; + /* block matches, hence tree below matches; * this request is done! */ dr->state = BRS_DOWNLOAD_UP; /* calculate how many bytes of payload this block @@ -1816,7 +1816,7 @@ GNUNET_FS_download_start_task_ (void *cls, /* already done entirely, party! */ if (dc->rfh != NULL) { - /* avoid hanging on to file handle longer than + /* avoid hanging on to file handle longer than * necessary */ GNUNET_DISK_file_close (dc->rfh); dc->rfh = NULL; @@ -1851,7 +1851,7 @@ GNUNET_FS_download_start_task_ (void *cls, { if (dc->rfh != NULL) { - /* avoid hanging on to file handle longer than + /* avoid hanging on to file handle longer than * necessary */ GNUNET_DISK_file_close (dc->rfh); dc->rfh = NULL; diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index a67b22036c..fadcfea055 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c @@ -227,7 +227,7 @@ GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h, * @param h handle to the file sharing subsystem * @param client_info initial value for the client-info value for this entry * @param length length of the file - * @param reader function that can be used to obtain the data for the file + * @param reader function that can be used to obtain the data for the file * @param reader_cls closure for "reader" * @param keywords under which keywords should this file be available * directly; can be NULL @@ -592,7 +592,7 @@ GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h, * * @param dir the directory * @param ent the entry to add; the entry must not have been - * added to any other directory at this point and + * added to any other directory at this point and * must not include "dir" in its structure * @return GNUNET_OK on success, GNUNET_SYSERR on error */ diff --git a/src/fs/fs_misc.c b/src/fs/fs_misc.c index 3a8260d05d..6bd4e59f80 100644 --- a/src/fs/fs_misc.c +++ b/src/fs/fs_misc.c @@ -30,7 +30,7 @@ /** * Suggest a filename based on given metadata. - * + * * @param md given meta data * @return NULL if meta data is useless for suggesting a filename */ diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c index 236e8d59b4..7475896a87 100644 --- a/src/fs/fs_namespace.c +++ b/src/fs/fs_namespace.c @@ -36,7 +36,7 @@ * Return the name of the directory in which we store * our local namespaces (or rather, their public keys). * - * @param h global fs handle + * @param h global fs handle * @return NULL on error, otherwise the name of the directory */ static char * @@ -61,7 +61,7 @@ get_namespace_directory (struct GNUNET_FS_Handle *h) * Return the name of the directory in which we store * the update information graph for the given local namespace. * - * @param ns namespace handle + * @param ns namespace handle * @return NULL on error, otherwise the name of the directory */ static char * @@ -87,7 +87,7 @@ get_update_information_directory (struct GNUNET_FS_Namespace *ns) /** * Write the namespace update node graph to a file. - * + * * @param ns namespace to dump */ static void @@ -134,7 +134,7 @@ END: /** * Read the namespace update node graph from a file. - * + * * @param ns namespace to read */ static void @@ -280,7 +280,7 @@ struct AdvertisementContext /** * Disconnect from the datastore. - * + * * @param cls datastore handle * @param tc scheduler context */ @@ -375,7 +375,7 @@ advertisement_cont (void *cls, int success, const char *msg) /** - * Publish an advertismement for a namespace. + * Publish an advertismement for a namespace. * * @param h handle to the file sharing subsystem * @param ksk_uri keywords to use for advertisment @@ -965,7 +965,7 @@ struct FindTreeClosure * head of an tree if it is in the 'tree_array' under its respective * 'tree_id'. * - * In short, we're trying to find the smallest number of tree to + * In short, we're trying to find the smallest number of tree to * cover a directed graph. * * @param cls closure (of type 'struct FindTreeClosure') @@ -988,7 +988,7 @@ find_trees (void *cls, const GNUNET_HashCode * key, void *value) return GNUNET_YES; /* circular */ GNUNET_assert (nsn->tree_id < fc->tree_array_size); if (fc->tree_array[nsn->tree_id] != nsn) - return GNUNET_YES; /* part of "another" (directed) TREE, + return GNUNET_YES; /* part of "another" (directed) TREE, * and not root of it, end trace */ if (nsn->tree_id == fc->id) return GNUNET_YES; /* that's our own root (can this be?) */ @@ -1015,12 +1015,12 @@ find_trees (void *cls, const GNUNET_HashCode * key, void *value) * produce an update. Namespace updates form a graph where each node * has a name. Each node can have any number of URI/meta-data entries * which can each be linked to other nodes. Cycles are possible. - * + * * Calling this function with "next_id" NULL will cause the library to * call "ip" with a root for each strongly connected component of the * graph (a root being a node from which all other nodes in the Tree * are reachable). - * + * * Calling this function with "next_id" being the name of a node will * cause the library to call "ip" with all children of the node. Note * that cycles within the final tree are possible (including self-loops). diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 94641e9349..b286d41ca9 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -38,7 +38,7 @@ /** - * Fill in all of the generic fields for + * Fill in all of the generic fields for * a publish event and call the callback. * * @param pi structure to fill in @@ -216,7 +216,7 @@ signal_publish_error (struct GNUNET_FS_FileInformation *p, /** * Datastore returns from reservation cancel request. - * + * * @param cls the 'struct GNUNET_FS_PublishContext' * @param success success code (not used) * @param msg error message (typically NULL, not used) @@ -371,7 +371,7 @@ block_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg) { pt_size = GNUNET_MIN (max, p->data.file.file_size - offset); if (pt_size == 0) - return 0; /* calling reader with pt_size==0 + return 0; /* calling reader with pt_size==0 * might free buf, so don't! */ if (pt_size != p->data.file.reader (p->data.file.reader_cls, offset, pt_size, buf, @@ -441,7 +441,7 @@ encode_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) * or (on error) "GNUNET_FS_tree_encode_finish". * * @param cls closure - * @param chk content hash key for the block + * @param chk content hash key for the block * @param offset offset of the block in the file * @param depth depth of the block in the file, 0 for DBLOCK * @param type type of the block (IBLOCK or DBLOCK) @@ -1059,7 +1059,7 @@ GNUNET_FS_publish_signal_suspend_ (void *cls) /** * We have gotten a reply for our space reservation request. * Either fail (insufficient space) or start publishing for good. - * + * * @param cls the 'struct GNUNET_FS_PublishContext*' * @param success positive reservation ID on success * @param msg error message on error, otherwise NULL @@ -1096,9 +1096,9 @@ finish_reserve (void *cls, int success, const char *msg) * @param namespace namespace to publish the file in, NULL for no namespace * @param nid identifier to use for the publishd content in the namespace * (can be NULL, must be NULL if namespace is NULL) - * @param nuid update-identifier that will be used for future updates + * @param nuid update-identifier that will be used for future updates * (can be NULL, must be NULL if namespace or nid is NULL) - * @param options options for the publication + * @param options options for the publication * @return context that can be used to control the publish operation */ struct GNUNET_FS_PublishContext * @@ -1206,7 +1206,7 @@ fip_signal_stop (void *cls, struct GNUNET_FS_FileInformation *fi, /** - * Stop an upload. Will abort incomplete uploads (but + * Stop an upload. Will abort incomplete uploads (but * not remove blocks that have already been publishd) or * simply clean up the state for completed uploads. * Must NOT be called from within the event callback! diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 0c47eb1738..10cce3f1f8 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c @@ -62,7 +62,7 @@ GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi, /** * Check if the given result is identical * to the given URI. - * + * * @param cls points to the URI we check against * @param key not used * @param value a "struct GNUNET_FS_SearchResult" who's URI we @@ -85,7 +85,7 @@ test_result_present (void *cls, const GNUNET_HashCode * key, void *value) /** * We've found a new CHK result. Let the client * know about it. - * + * * @param sc the search context * @param sr the specific result */ @@ -107,7 +107,7 @@ notify_client_chk_result (struct GNUNET_FS_SearchContext *sc, /** * We've found new information about an existing CHK result. Let the * client know about it. - * + * * @param sc the search context * @param sr the specific result */ @@ -151,7 +151,7 @@ struct GetResultContext /** * Check if the given result is identical to the given URI and if so * return it. - * + * * @param cls a "struct GetResultContext" * @param key not used * @param value a "struct GNUNET_FS_SearchResult" who's URI we @@ -1379,7 +1379,7 @@ GNUNET_FS_search_start (struct GNUNET_FS_Handle *h, /** - * Pause search. + * Pause search. * * @param sc context for the search that should be paused */ diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 58d0f01273..60e80efbb1 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c @@ -100,7 +100,7 @@ struct GNUNET_FS_TreeEncoder * In-memory cache of the current CHK tree. * This struct will contain the CHK values * from the root to the currently processed - * node in the tree as identified by + * node in the tree as identified by * "current_depth" and "publish_offset". * The "chktree" will be initially NULL, * then allocated to a sufficient number of @@ -176,8 +176,8 @@ GNUNET_FS_tree_compute_tree_size (unsigned int depth) * * @param depth depth of the IBlock in the tree, 0 would be a DBLOCK, * must be > 0 (this function is for IBLOCKs only!) - * @param end_offset current offset in the payload (!) of the overall file, - * must be > 0 (since this function is called at the + * @param end_offset current offset in the payload (!) of the overall file, + * must be > 0 (since this function is called at the * end of a block). * @return size of the corresponding IBlock */ @@ -264,7 +264,7 @@ GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset, * @param cls closure for reader, proc, progress and cont * @param reader function to call to read plaintext data * @param proc function to call on each encrypted block - * @param progress function to call with progress information + * @param progress function to call with progress information * @param cont function to call when done */ struct GNUNET_FS_TreeEncoder * @@ -298,7 +298,7 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size, * * @param depth depth of the IBlock in the tree (aka overall * number of tree levels minus depth); 0 == DBlock - * @param end_offset current offset in the overall file, + * @param end_offset current offset in the overall file, * at the *beginning* of the block for DBLOCKs (depth==0), * otherwise at the *end* of the block (exclusive) * @return (array of CHKs') offset in the above IBlock @@ -421,7 +421,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te) /** * Clean up a tree encoder and return information * about the resulting URI or an error message. - * + * * @param te the tree encoder to clean up * @param uri set to the resulting URI (if encoding finished) * @param emsg set to an error message (if an error occured diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h index b39a47cd31..56c32a3907 100644 --- a/src/fs/fs_tree.h +++ b/src/fs/fs_tree.h @@ -35,7 +35,7 @@ #include "fs.h" /** - * Compute the depth of the CHK tree. + * Compute the depth of the CHK tree. * * @param flen file length for which to compute the depth * @return depth of the tree, always > 0. A depth of 1 means only a DBLOCK. @@ -133,7 +133,7 @@ typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset, * @param cls closure for reader, proc, progress and cont * @param reader function to call to read plaintext data * @param proc function to call on each encrypted block - * @param progress function to call with progress information + * @param progress function to call with progress information * @param cont function to call when done * @return tree encoder context */ @@ -146,8 +146,8 @@ GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size, /** - * Encrypt the next block of the file (and - * call proc and progress accordingly; or + * Encrypt the next block of the file (and + * call proc and progress accordingly; or * of course "cont" if we have already completed * encoding of the entire file). * @@ -160,7 +160,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te); /** * Clean up a tree encoder and return information * about the resulting URI or an error message. - * + * * @param te the tree encoder to clean up * @param uri set to the resulting URI (if encoding finished) * @param emsg set to an error message (if an error occured @@ -179,7 +179,7 @@ GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te, /** * Get data that would be needed to resume * the encoding later. - * + * * @param te encoding to resume * @param data set to the resume data * @param size set to the size of the resume data @@ -192,7 +192,7 @@ GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te, /** * Reset tree encoder to point previously * obtained for resuming. - * + * * @param te encoding to resume * @param data the resume data * @param size the size of the resume data diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index a992c5ff6a..a37a39a785 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c @@ -68,7 +68,7 @@ unindex_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg) /** - * Fill in all of the generic fields for + * Fill in all of the generic fields for * an unindex event and call the callback. * * @param pi structure to fill in @@ -443,7 +443,7 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls) * @param h handle to the file sharing subsystem * @param filename file to unindex * @param cctx initial value for the client context - * @return NULL on error, otherwise handle + * @return NULL on error, otherwise handle */ struct GNUNET_FS_UnindexContext * GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 206a8adca8..b654b2a81d 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c @@ -125,7 +125,7 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key) * Convert keyword URI to a human readable format * (i.e. the search query that was used in the first place) * - * @param uri ksk uri to convert to a string + * @param uri ksk uri to convert to a string * @return string with the keywords */ char * @@ -187,7 +187,7 @@ GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri) * spaces), return a copy of the keyword without %-encoding and * without double-quotes (%22). Also, add a space at the beginning * if there is not a '+'. - * + * * @param in string with %-encoding * @param emsg where to store the parser error message (if any) * @return decodded string with leading space (or preserved plus) @@ -971,7 +971,7 @@ GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id) /** * Canonicalize a keyword. - * + * * @param in input string (the keyword) * @return canonicalized keyword */ @@ -1049,7 +1049,7 @@ canonicalize_keyword (const char *in) * as decapitalization and removal of certain characters. * (useful for search). * - * @param uri the URI to canonicalize + * @param uri the URI to canonicalize * @return canonicalized version of the URI, NULL on error */ struct GNUNET_FS_Uri * @@ -1568,7 +1568,7 @@ GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri) * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 748a8f09cb..f38805c2b7 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c @@ -75,7 +75,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Called by FS client to give information about the progress of an + * Called by FS client to give information about the progress of an * operation. * * @param cls closure diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 7edad6979f..9cfdfe6a57 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c @@ -87,7 +87,7 @@ do_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Called by FS client to give information about the progress of an + * Called by FS client to give information about the progress of an * operation. * * @param cls closure diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index eb53458334..3a30f6c2bc 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c @@ -62,7 +62,7 @@ static int local_only; * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found @@ -117,7 +117,7 @@ clean_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Called by FS client to give information about the progress of an + * Called by FS client to give information about the progress of an * operation. * * @param cls closure diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 0457607d5c..2e3c7742f5 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -24,7 +24,7 @@ * @author Christian Grothoff * * To use: - * - consider re-issue GSF_dht_lookup_ after non-DHT reply received + * - consider re-issue GSF_dht_lookup_ after non-DHT reply received * - implement 'SUPPORT_DELAYS' * */ @@ -59,7 +59,7 @@ /** - * How quickly do we age cover traffic? At the given + * How quickly do we age cover traffic? At the given * time interval, remaining cover traffic counters are * decremented by 1/16th. */ @@ -106,13 +106,13 @@ struct GNUNET_LOAD_Value *GSF_rt_entry_lifetime; double GSF_current_priorities; /** - * How many query messages have we received 'recently' that + * How many query messages have we received 'recently' that * have not yet been claimed as cover traffic? */ unsigned int GSF_cover_query_count; /** - * How many content messages have we received 'recently' that + * How many content messages have we received 'recently' that * have not yet been claimed as cover traffic? */ unsigned int GSF_cover_content_count; @@ -192,8 +192,8 @@ GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start) /** * Test if the DATABASE (GET) load on this peer is too high * to even consider processing the query at - * all. - * + * all. + * * @return GNUNET_YES if the load is too high to do anything (load high) * GNUNET_NO to process normally (load normal) * GNUNET_SYSERR to process for free (load low) @@ -311,7 +311,7 @@ handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, /** * We're done with the local lookup, now consider * P2P processing (depending on request options and - * result status). Also signal that we can now + * result status). Also signal that we can now * receive more request information from the client. * * @param cls the client doing the request ('struct GNUNET_SERVER_Client') diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h index bee8143186..ef2eebc8db 100644 --- a/src/fs/gnunet-service-fs.h +++ b/src/fs/gnunet-service-fs.h @@ -137,13 +137,13 @@ extern struct GNUNET_LOAD_Value *GSF_rt_entry_lifetime; extern double GSF_current_priorities; /** - * How many query messages have we received 'recently' that + * How many query messages have we received 'recently' that * have not yet been claimed as cover traffic? */ extern unsigned int GSF_cover_query_count; /** - * How many content messages have we received 'recently' that + * How many content messages have we received 'recently' that * have not yet been claimed as cover traffic? */ extern unsigned int GSF_cover_content_count; @@ -161,8 +161,8 @@ extern int GSF_enable_randomized_delays; /** * Test if the DATABASE (GET) load on this peer is too high * to even consider processing the query at - * all. - * + * all. + * * @return GNUNET_YES if the load is too high to do anything (load high) * GNUNET_NO to process normally (load normal) * GNUNET_SYSERR to process for free (load low) diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 96d906c5b7..527ca7677f 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -364,7 +364,7 @@ update_atsi (struct GSF_ConnectedPeer *cp, /** * Return the performance data record for the given peer - * + * * @param cp peer to query * @return performance data record for the peer */ @@ -818,7 +818,7 @@ transmit_delayed_now (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Get the randomized delay a response should be subjected to. - * + * * @return desired delay */ static struct GNUNET_TIME_Relative @@ -844,7 +844,7 @@ get_randomized_delay () * Handle a reply to a pending request. Also called if a request * expires (then with data == NULL). The handler may be called * many times (depending on the request type), but will not be - * called during or after a call to GSF_pending_request_cancel + * called during or after a call to GSF_pending_request_cancel * and will also not be called anymore after a call signalling * expiration. * @@ -997,7 +997,7 @@ change_host_trust (struct GSF_ConnectedPeer *cp, int value) /** * We've received a request with the specified priority. Bound it * according to how much we trust the given peer. - * + * * @param prio_in requested priority * @param cp the peer making the request * @return effective priority @@ -1333,7 +1333,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, * Function called if there has been a timeout trying to satisfy * a transmission request. * - * @param cls the 'struct GSF_PeerTransmitHandle' of the request + * @param cls the 'struct GSF_PeerTransmitHandle' of the request * @param tc scheduler context */ static void @@ -1717,7 +1717,7 @@ create_migration_stop_message (void *cls, size_t size, void *buf) /** * Ask a peer to stop migrating data to us until the given point * in time. - * + * * @param cp peer to ask * @param block_time until when to block */ diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 3f25363f19..0f22b02807 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h @@ -308,7 +308,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, /** * Return the performance data record for the given peer - * + * * @param cp peer to query * @return performance data record for the peer */ @@ -319,7 +319,7 @@ GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp); /** * Ask a peer to stop migrating data to us until the given point * in time. - * + * * @param cp peer to ask * @param block_time until when to block */ diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index 6460d4f133..a7e78a6ed7 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c @@ -209,7 +209,7 @@ client_request_destroy (void *cls, * Handle a reply to a pending request. Also called if a request * expires (then with data == NULL). The handler may be called * many times (depending on the request type), but will not be - * called during or after a call to GSF_pending_request_cancel + * called during or after a call to GSF_pending_request_cancel * and will also not be called anymore after a call signalling * expiration. * @@ -217,7 +217,7 @@ client_request_destroy (void *cls, * @param eval evaluation of the result * @param pr handle to the original pending request * @param reply_anonymity_level anonymity level for the reply, UINT32_MAX for "unknown" - * @param expiration when does 'data' expire? + * @param expiration when does 'data' expire? * @param type type of the block * @param data response data, NULL on request expiration * @param data_len number of bytes in data diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index d1a8a11632..1ed7085c40 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c @@ -31,7 +31,7 @@ /** - * List of GSF_PendingRequests this request plan + * List of GSF_PendingRequests this request plan * participates with. */ struct PendingRequestList; @@ -67,7 +67,7 @@ struct GSF_RequestPlanReference /** - * List of GSF_PendingRequests this request plan + * List of GSF_PendingRequests this request plan * participates with. */ struct PendingRequestList @@ -228,7 +228,7 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp) gettext_noop ("# average retransmission delay (ms)"), total_delay * 1000LL / plan_count, GNUNET_NO); prd = GSF_pending_request_get_data_ (rp->prl_head->pr); - // FIXME: calculate 'rp->priority'! + // FIXME: calculate 'rp->priority'! if (rp->transmission_counter < 32) delay = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, @@ -533,7 +533,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr) * Notify the plan about a peer being no longer available; * destroy all entries associated with this peer. * - * @param cp connected peer + * @param cp connected peer */ void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp) diff --git a/src/fs/gnunet-service-fs_pe.h b/src/fs/gnunet-service-fs_pe.h index 23787908e5..3ae9904a63 100644 --- a/src/fs/gnunet-service-fs_pe.h +++ b/src/fs/gnunet-service-fs_pe.h @@ -43,7 +43,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr); * Notify the plan about a peer being no longer available; * destroy all entries associated with this peer. * - * @param cp connected peer + * @param cp connected peer */ void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp); diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index e5cb1f03c2..a1fc60bd9a 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c @@ -254,7 +254,7 @@ refresh_bloomfilter (struct GSF_PendingRequest *pr) /** - * Create a new pending request. + * Create a new pending request. * * @param options request options * @param type type of the block that is being requested @@ -384,7 +384,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, /** * Obtain the public data associated with a pending request - * + * * @param pr pending request * @return associated public data */ @@ -399,7 +399,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr) * Test if two pending requests are compatible (would generate * the same query modulo filters and should thus be processed * jointly). - * + * * @param pra a pending request * @param pra another pending request * @return GNUNET_OK if the requests are compatible @@ -957,8 +957,8 @@ put_migration_continuation (void *cls, int success, const char *msg) /** * Test if the DATABASE (PUT) load on this peer is too high * to even consider processing the query at - * all. - * + * all. + * * @return GNUNET_YES if the load is too high to do anything (load high) * GNUNET_NO to process normally (load normal or low) */ @@ -1089,7 +1089,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr) /** * Task that issues a warning if the datastore lookup takes too long. - * + * * @param cls the 'struct GSF_PendingRequest' * @param tc task context */ @@ -1110,7 +1110,7 @@ warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Task that issues a warning if the datastore lookup takes too long. - * + * * @param cls the 'struct GSF_PendingRequest' * @param tc task context */ diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index b68989be7a..03fc047fbc 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h @@ -153,7 +153,7 @@ struct GSF_PendingRequestData * Handle a reply to a pending request. Also called if a request * expires (then with data == NULL). The handler may be called * many times (depending on the request type), but will not be - * called during or after a call to GSF_pending_request_cancel + * called during or after a call to GSF_pending_request_cancel * and will also not be called anymore after a call signalling * expiration. * @@ -180,7 +180,7 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls, /** - * Create a new pending request. + * Create a new pending request. * * @param options request options * @param type type of the block that is being requested @@ -232,7 +232,7 @@ GSF_pending_request_update_ (struct GSF_PendingRequest *pr, /** * Obtain the public data associated with a pending request - * + * * @param pr pending request * @return associated public data */ @@ -244,7 +244,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr); * Test if two pending requests are compatible (would generate * the same query modulo filters and should thus be processed * jointly). - * + * * @param pra a pending request * @param pra another pending request * @return GNUNET_OK if the requests are compatible diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c index fb05366afe..acdba81f06 100644 --- a/src/fs/gnunet-service-fs_push.c +++ b/src/fs/gnunet-service-fs_push.c @@ -34,7 +34,7 @@ #define DEBUG_FS_MIGRATION GNUNET_NO /** - * How long must content remain valid for us to consider it for migration? + * How long must content remain valid for us to consider it for migration? * If content will expire too soon, there is clearly no point in pushing * it to other peers. This value gives the threshold for migration. Note * that if this value is increased, the migration testcase may need to be @@ -65,7 +65,7 @@ struct MigrationReadyBlock GNUNET_HashCode query; /** - * When does this block expire? + * When does this block expire? */ struct GNUNET_TIME_Absolute expiration; @@ -313,7 +313,7 @@ count_targets (struct MigrationReadyBlock *block) /** * Check if sending this block to this peer would - * be a good idea. + * be a good idea. * * @param peer target peer * @param block the block @@ -419,7 +419,7 @@ find_content (struct MigrationReadyPeer *mrp) /** * Task that is run periodically to obtain blocks for content * migration - * + * * @param cls unused * @param tc scheduler context (also unused) */ @@ -539,7 +539,7 @@ process_migration_content (void *cls, const GNUNET_HashCode * key, size_t size, /** * Task that is run periodically to obtain blocks for content * migration - * + * * @param cls unused * @param tc scheduler context (also unused) */ diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c index 4b4925d22f..5771b56650 100644 --- a/src/fs/gnunet-service-fs_put.c +++ b/src/fs/gnunet-service-fs_put.c @@ -82,7 +82,7 @@ static struct PutOperator operators[] = { /** * Task that is run periodically to obtain blocks for DHT PUTs. - * + * * @param cls type of blocks to gather * @param tc scheduler context (unused) */ @@ -93,7 +93,7 @@ gather_dht_put_blocks (void *cls, /** * Task that is run periodically to obtain blocks for DHT PUTs. - * + * * @param cls type of blocks to gather * @param tc scheduler context (unused) */ @@ -169,7 +169,7 @@ process_dht_put_content (void *cls, const GNUNET_HashCode * key, size_t size, /** * Task that is run periodically to obtain blocks for DHT PUTs. - * + * * @param cls type of blocks to gather * @param tc scheduler context (unused) */ diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index d52956a753..25560ca102 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c @@ -61,7 +61,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) } /** - * Called by FS client to give information about the progress of an + * Called by FS client to give information about the progress of an * operation. * * @param cls closure diff --git a/src/fs/perf_gnunet_service_fs_p2p_trust.c b/src/fs/perf_gnunet_service_fs_p2p_trust.c index 3432714b38..6140bb74fc 100644 --- a/src/fs/perf_gnunet_service_fs_p2p_trust.c +++ b/src/fs/perf_gnunet_service_fs_p2p_trust.c @@ -37,7 +37,7 @@ * Download speed of type `seeder 1' was 757 KiB/s * Download speed of type `seeder 2' was 613 KiB/s * Download speed of type `leach` was 539 KiB/s - * + * * - 10 MB, 3 peers, without delays: * Download speed of type `seeder 1' was 1784 KiB/s * Download speed of type `seeder 2' was 1604 KiB/s diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c index c7a0a8b7cc..c26a609780 100644 --- a/src/fs/test_fs_download_persistence.c +++ b/src/fs/test_fs_download_persistence.c @@ -138,8 +138,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Consider scheduling the restart-task. - * Only runs the restart task once per event + * Consider scheduling the restart-task. + * Only runs the restart task once per event * category. * * @param ev type of the event to consider diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c index 704c2a4c04..eab0aa650f 100644 --- a/src/fs/test_fs_publish_persistence.c +++ b/src/fs/test_fs_publish_persistence.c @@ -112,8 +112,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Consider scheduling the restart-task. - * Only runs the restart task once per event + * Consider scheduling the restart-task. + * Only runs the restart task once per event * category. * * @param ev type of the event to consider diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index 6eb18dafb2..335b1bee34 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c @@ -102,8 +102,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Consider scheduling the restart-task. - * Only runs the restart task once per event + * Consider scheduling the restart-task. + * Only runs the restart task once per event * category. * * @param ev type of the event to consider diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c index e814008174..69623ac7c8 100644 --- a/src/fs/test_fs_unindex_persistence.c +++ b/src/fs/test_fs_unindex_persistence.c @@ -108,8 +108,8 @@ restart_fs_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Consider scheduling the restart-task. - * Only runs the restart task once per event + * Consider scheduling the restart-task. + * Only runs the restart task once per event * category. * * @param ev type of the event to consider diff --git a/src/hello/hello.c b/src/hello/hello.c index 5d64d8f5ae..501f057c82 100644 --- a/src/hello/hello.c +++ b/src/hello/hello.c @@ -600,9 +600,9 @@ find_matching (void *cls, const char *tname, * @param h2 the second HELLO message * @param now time to use for deciding which addresses have * expired and should not be considered at all - * @return absolute time forever if the two HELLOs are + * @return absolute time forever if the two HELLOs are * totally identical; smallest timestamp >= now if - * they only differ in timestamps; + * they only differ in timestamps; * zero if the some addresses with expirations >= now * do not match at all */ diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index f6a47f4d96..85c6911728 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -775,7 +775,7 @@ download_prepare () /** * Task that is run when we are ready to receive more data from the hostlist - * server. + * server. * * @param cls closure, unused * @param tc task context, unused @@ -1221,7 +1221,7 @@ handler_advertisement (void *cls, const struct GNUNET_PeerIdentity *peer, /** - * Continuation called by the statistics code once + * Continuation called by the statistics code once * we go the stat. Initiates hostlist download scheduling. * * @param cls closure diff --git a/src/include/block_fs.h b/src/include/block_fs.h index c3dcdeced1..9dc22e57f8 100644 --- a/src/include/block_fs.h +++ b/src/include/block_fs.h @@ -140,7 +140,7 @@ struct NBlock /** - * @brief index block (indexing a DBlock that + * @brief index block (indexing a DBlock that * can be obtained directly from reading * the plaintext file) */ diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 618eab0a6c..9317ace438 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h @@ -25,7 +25,7 @@ * * TODO: * - move GNUNET_TRANSPORT_ATS* in here and rename... - * - extend API to express communication preferences to ATS + * - extend API to express communication preferences to ATS * (to be called DIRECTLY from apps, not from transport/core!) */ #ifndef GNUNET_ATS_SERVICE_H @@ -47,7 +47,7 @@ struct GNUNET_ATS_Handle; * Signature of a function called by ATS to notify the callee that the * assigned bandwidth or address for a given peer was changed. If the * callback is called with address/bandwidth assignments of zero, the - * ATS disconnect function will still be called once the disconnect + * ATS disconnect function will still be called once the disconnect * actually happened. * * @param cls closure @@ -99,7 +99,7 @@ GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc); /** - * Signature of a function that takes an address suggestion + * Signature of a function that takes an address suggestion * * @param cls closure * @param peer identity of the new peer @@ -117,7 +117,7 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, const char *plugin_name, const void *plugin_addr, size_t plugin_addr_len, - struct Session *session, + struct Session * session, struct GNUNET_BANDWIDTH_Value32NBO bandwidth, diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h index 66b2490c0f..01a1ec2fc2 100644 --- a/src/include/gnunet_block_lib.h +++ b/src/include/gnunet_block_lib.h @@ -69,7 +69,7 @@ enum GNUNET_BLOCK_Type GNUNET_BLOCK_TYPE_FS_SBLOCK = 4, /** - * Type of a block that is used to advertise a namespace. + * Type of a block that is used to advertise a namespace. */ GNUNET_BLOCK_TYPE_FS_NBLOCK = 5, @@ -156,7 +156,7 @@ struct GNUNET_BLOCK_Context; /** * Mingle hash with the mingle_number to produce different bits. - * + * * @param in original hash code * @param mingle_number number for hash permutation * @param hc where to store the result. @@ -188,7 +188,7 @@ GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx); /** * Function called to validate a reply or a request. For * request evaluation, simply pass "NULL" for the reply_block. - * Note that it is assumed that the reply has already been + * Note that it is assumed that the reply has already been * matched to the key (and signatures checked) as it would * be done with the "get_key" function. * @@ -221,7 +221,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, * @param block block to get the key for * @param block_size number of bytes in block * @param key set to the key (query) for the given block - * @return GNUNET_YES on success, + * @return GNUNET_YES on success, * GNUNET_NO if the block is malformed * GNUNET_SYSERR if type not supported * (or if extracting a key from a block of this type does not work) diff --git a/src/include/gnunet_block_plugin.h b/src/include/gnunet_block_plugin.h index 6d1f2f1036..0ead4afad4 100644 --- a/src/include/gnunet_block_plugin.h +++ b/src/include/gnunet_block_plugin.h @@ -20,7 +20,7 @@ /** * @file include/gnunet_block_plugin.h - * @brief API for block plugins. Each block plugin must conform to + * @brief API for block plugins. Each block plugin must conform to * the API specified by this header. * @author Christian Grothoff */ @@ -35,7 +35,7 @@ /** * Function called to validate a reply or a request. For * request evaluation, simply pass "NULL" for the reply_block. - * Note that it is assumed that the reply has already been + * Note that it is assumed that the reply has already been * matched to the key (and signatures checked) as it would * be done with the "get_key" function. * @@ -81,7 +81,7 @@ typedef enum * @param block block to get the key for * @param block_size number of bytes in block * @param key set to the key (query) for the given block - * @return GNUNET_YES on success, + * @return GNUNET_YES on success, * GNUNET_NO if the block is malformed * GNUNET_SYSERR if type not supported * (or if extracting a key from a block of this type does not work) @@ -112,7 +112,7 @@ struct GNUNET_BLOCK_PluginFunctions const enum GNUNET_BLOCK_Type *types; /** - * Main function of a block plugin. Allows us to check if a + * Main function of a block plugin. Allows us to check if a * block matches a query. */ GNUNET_BLOCK_EvaluationFunction evaluate; diff --git a/src/include/gnunet_chat_service.h b/src/include/gnunet_chat_service.h index 5eb0daf3f9..938b434237 100644 --- a/src/include/gnunet_chat_service.h +++ b/src/include/gnunet_chat_service.h @@ -20,7 +20,7 @@ /** * @file include/gnunet_chat_service.h - * @brief API for chatting via GNUnet + * @brief API for chatting via GNUnet * @author Christian Grothoff * @author Nathan Evans * @author Vitaly Minko diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h index ed033d0311..64892de0f1 100644 --- a/src/include/gnunet_client_lib.h +++ b/src/include/gnunet_client_lib.h @@ -163,7 +163,7 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock, /** * Cancel a request for notification. - * + * * @param th handle from the original request. */ void @@ -188,7 +188,7 @@ GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle * if the caller does not care about temporary connection errors, * for example because the protocol is stateless * @param rn function to call with the response - * @param rn_cls closure for rn + * @param rn_cls closure for rn * @return GNUNET_OK on success, GNUNET_SYSERR if a request * is already pending */ diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 2636824d31..b8a667524c 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -235,7 +235,7 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); * NOT reentrant! * * @param hc the hash code - * @return string + * @return string */ const char * GNUNET_h2s (const GNUNET_HashCode * hc); @@ -368,7 +368,7 @@ GNUNET_htonll (unsigned long long n); /** * Allocate and initialize a block of memory. - * + * * @param buf data to initalize the block with * @param size the number of bytes in buf (and size of the allocation) * @return pointer to size bytes of memory, never NULL (!) diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index f7a6e5078b..7ee3c109df 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h @@ -232,7 +232,7 @@ GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock, /** * Close the socket and free associated resources. Pending * transmissions may be completed or dropped depending on the - * arguments. If a receive call is pending and should + * arguments. If a receive call is pending and should * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' * should be called explicitly first. * diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index da408bf55e..190cabbb0b 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h @@ -69,7 +69,7 @@ extern "C" #define GNUNET_CONSTANTS_EXEC_WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 200) /** - * After how long do we retry a service connection that was + * After how long do we retry a service connection that was * unavailable? Used in cases where an exponential back-off * seems inappropriate. */ @@ -99,13 +99,13 @@ extern "C" /** * Size of the 'struct EncryptedMessage' of the core (which - * is the per-message overhead of the core). + * is the per-message overhead of the core). */ #define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (GNUNET_HashCode)) /** - * Size of the 'struct OutboundMessage' of the transport - * (which, in combination with the + * Size of the 'struct OutboundMessage' of the transport + * (which, in combination with the * GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE) defines * the headers that must be pre-pendable to all GNUnet * messages. Taking GNUNET_SERVER_MAX_MESSAGE_SIZE @@ -123,7 +123,7 @@ extern "C" * * Could theoretically be 64k minus (GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE + * GNUNET_CONSTANTS_TRANSPORT_SIZE_OUTBOUND_MESSAGE), but we're going - * to be more conservative for now. + * to be more conservative for now. */ #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index cad85d016b..0c7f60a7a3 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -239,7 +239,7 @@ struct GNUNET_CONTAINER_MetaData; /** * Create a fresh MetaData token. - * + * * @return empty meta-data container */ struct GNUNET_CONTAINER_MetaData * @@ -247,7 +247,7 @@ GNUNET_CONTAINER_meta_data_create (void); /** * Duplicate a MetaData token. - * + * * @param md what to duplicate * @return duplicate meta-data container */ @@ -289,7 +289,7 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found @@ -999,7 +999,7 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap); /** * Removes a node from the heap. - * + * * @param node node to remove * @return element data stored at the node, NULL if heap is empty */ @@ -1047,12 +1047,12 @@ enum GNUNET_CONTAINER_SListDisposition /** - * Handle to a singly linked list + * Handle to a singly linked list */ struct GNUNET_CONTAINER_SList; /** - * Handle to a singly linked list iterator + * Handle to a singly linked list iterator */ struct GNUNET_CONTAINER_SList_Iterator; diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 083276804c..0fcff6d6fd 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -201,7 +201,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls, * can be used to improve efficiency, ignored if inbound_notify is NULL * note that the core is allowed to drop notifications about inbound * messages if the client does not process them fast enough (for this - * notification type, a bounded queue is used) + * notification type, a bounded queue is used) * @param outbound_notify function to call for all outbound messages, can be NULL; * note that the core is allowed to drop notifications about outbound * messages if the client does not process them fast enough (for this @@ -234,7 +234,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, /** - * Disconnect from the core service. This function can only + * Disconnect from the core service. This function can only * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' * requests have been explicitly cancelled. * @@ -371,7 +371,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, /** * Cancel request for getting information about a peer. * Note that an eventual change in preference, trust or bandwidth - * assignment MAY have already been committed at the time, + * assignment MAY have already been committed at the time, * so cancelling a request is NOT sure to undo the original * request. The original request may or may not still commit. * The only thing cancellation ensures is that the callback @@ -429,7 +429,7 @@ struct GNUNET_CORE_TransmitHandle; * given number of bytes to the specified "target". Must only be * called after a connection to the respective peer has been * established (and the client has been informed about this). - * + * * * @param handle connection to core service * @param cork is corking allowed for this transmission? diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index d5a1685d15..f97b351c96 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h @@ -247,7 +247,7 @@ GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i); /** - * Random on unsigned 64-bit values. + * Random on unsigned 64-bit values. * * @param mode desired quality of the random number * @param max value returned will be in range [0,max) (exclusive) @@ -471,7 +471,7 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, * * @param a some hash code * @param b some hash code - * @param result set to b - a + * @param result set to b - a */ void GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a, @@ -497,7 +497,7 @@ GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a, * * @param a some hash code * @param b some hash code - * @param result set to a ^ b + * @param result set to a ^ b */ void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b, @@ -693,7 +693,7 @@ GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len); * files does not exist, create a new key and write it to the * file. Caller must free return value. Note that this function * can not guarantee that another process might not be trying - * the same operation on the same file at the same time. + * the same operation on the same file at the same time. * If the contents of the file * are invalid the old file is deleted and a fresh key is * created. @@ -807,7 +807,7 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose, /** * This function should only be called in testcases * where strong entropy gathering is not desired - * (for example, for hostkey generation). + * (for example, for hostkey generation). */ void GNUNET_CRYPTO_random_disable_entropy_gathering (void); diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h index 6868d6b760..fbfcdf1e8b 100644 --- a/src/include/gnunet_datacache_plugin.h +++ b/src/include/gnunet_datacache_plugin.h @@ -40,7 +40,7 @@ extern "C" /** * Function called by plugins to notify the datacache * about content deletions. - * + * * @param cls closure * @param key key of the content that was deleted * @param size number of bytes that were made available @@ -133,7 +133,7 @@ struct GNUNET_DATACACHE_PluginFunctions /** * Delete the entry with the lowest expiration value * from the datacache right now. - * + * * @param cls closure (internal context for the plugin) * @return GNUNET_OK on success, GNUNET_SYSERR on error */ diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h index b0aa0c6c9d..fb1dff51d2 100644 --- a/src/include/gnunet_datastore_plugin.h +++ b/src/include/gnunet_datastore_plugin.h @@ -45,7 +45,7 @@ * changes. * * @param cls closure - * @param delta change in disk utilization, + * @param delta change in disk utilization, * 0 for "reset to empty" */ typedef void (*DiskUtilizationChange) (void *cls, int delta); @@ -138,7 +138,7 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, * Get one of the results for a particular key in the datastore. * * @param cls closure - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param key key to match, never NULL * @param vhash hash of the value, maybe NULL (to @@ -148,7 +148,7 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, * there may be! * @param type entries of which type are relevant? * Use 0 for any type. - * @param proc function to call on the matching value; + * @param proc function to call on the matching value; * proc should be called with NULL if there is no result * @param proc_cls closure for proc */ @@ -203,10 +203,10 @@ typedef int (*PluginUpdate) (void *cls, uint64_t uid, int delta, /** * Select a single item from the datastore at the specified offset - * (among those applicable). + * (among those applicable). * * @param cls closure - * @param offset offset of the result (modulo num-results); + * @param offset offset of the result (modulo num-results); * specific ordering does not matter for the offset * @param type entries of which type should be considered? * Must not be zero (ANY). diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h index 3d2cc35c98..03ec9117c0 100644 --- a/src/include/gnunet_datastore_service.h +++ b/src/include/gnunet_datastore_service.h @@ -371,7 +371,7 @@ GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h, /** * Cancel a datastore operation. The final callback from the * operation must not have been done yet. - * + * * @param qe operation to cancel */ void diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index abca17370b..5f6a378403 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h @@ -103,37 +103,37 @@ enum GNUNET_DISK_OpenFlags { /** - * Open the file for reading + * Open the file for reading */ GNUNET_DISK_OPEN_READ = 1, /** - * Open the file for writing + * Open the file for writing */ GNUNET_DISK_OPEN_WRITE = 2, /** - * Open the file for both reading and writing + * Open the file for both reading and writing */ GNUNET_DISK_OPEN_READWRITE = 3, /** - * Fail if file already exists + * Fail if file already exists */ GNUNET_DISK_OPEN_FAILIFEXISTS = 4, /** - * Truncate file if it exists + * Truncate file if it exists */ GNUNET_DISK_OPEN_TRUNCATE = 8, /** - * Create file if it doesn't exist + * Create file if it doesn't exist */ GNUNET_DISK_OPEN_CREATE = 16, /** - * Append to the file + * Append to the file */ GNUNET_DISK_OPEN_APPEND = 32 }; @@ -342,7 +342,7 @@ GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev, * an absolute path, the current 'TMPDIR' will be prepended. In any case, * 6 random characters will be appended to the name to create a unique * filename. - * + * * @param t component to use for the name; * does NOT contain "XXXXXX" or "/tmp/". * @return NULL on error, otherwise name of fresh @@ -463,7 +463,7 @@ GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h, * @param fn file name * @param buffer the data to write * @param n number of bytes to write - * @param mode file permissions + * @param mode file permissions * @return number of bytes written on success, GNUNET_SYSERR on error */ ssize_t diff --git a/src/include/gnunet_fragmentation_lib.h b/src/include/gnunet_fragmentation_lib.h index 06022e093d..a953bd2b13 100644 --- a/src/include/gnunet_fragmentation_lib.h +++ b/src/include/gnunet_fragmentation_lib.h @@ -154,7 +154,7 @@ typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id, * Create a defragmentation context. * * @param stats statistics context - * @param mtu the maximum message size for each fragment + * @param mtu the maximum message size for each fragment * @param num_msgs how many fragmented messages * to we defragment at most at the same time? * @param cls closure for proc and ackp diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index e8026a66f6..7bfb15ac03 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -19,7 +19,7 @@ */ /** * @file include/gnunet_fs_service.h - * @brief API for file-sharing via GNUnet + * @brief API for file-sharing via GNUnet * @author Christian Grothoff */ #ifndef GNUNET_FS_LIB_H @@ -105,7 +105,7 @@ GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri); * Convert keyword URI to a human readable format * (i.e. the search query that was used in the first place) * - * @param uri ksk uri to convert to a string + * @param uri ksk uri to convert to a string * @return string with the keywords */ char * @@ -232,7 +232,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri, * as decapitalization and removal of certain characters. * (useful for search). * - * @param uri the URI to canonicalize + * @param uri the URI to canonicalize * @return canonicalized version of the URI, NULL on error */ struct GNUNET_FS_Uri * @@ -490,13 +490,13 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext /** - * Possible status codes used in the callback for the + * Possible status codes used in the callback for the * various file-sharing operations. On each file (or search), * the callback is guaranteed to be called once with "START" * and once with STOPPED; calls with PROGRESS, ERROR or COMPLETED * are optional and depend on the circumstances; parent operations * will be STARTED before child-operations and STOPPED after - * their respective child-operations. START and STOP signals + * their respective child-operations. START and STOP signals * are typically generated either due to explicit client requests * or because of suspend/resume operations. */ @@ -602,7 +602,7 @@ enum GNUNET_FS_Status GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT, /** - * First event generated when a client requests + * First event generated when a client requests * a search to begin or when a namespace result * automatically triggers the search for updates. */ @@ -807,7 +807,7 @@ struct GNUNET_FS_ProgressInfo /** * How large is the file overall? For directories, * this is only the size of the directory itself, - * not of the other files contained within the + * not of the other files contained within the * directory. */ uint64_t size; @@ -864,7 +864,7 @@ struct GNUNET_FS_ProgressInfo uint64_t data_len; /** - * Depth of the given block in the tree; + * Depth of the given block in the tree; * 0 would be the lowest level (DBLOCKs). */ unsigned int depth; @@ -950,7 +950,7 @@ struct GNUNET_FS_ProgressInfo /** * Client context pointer for the associated search operation * (specifically, context pointer for the specific search - * result, not the overall search); only set if this + * result, not the overall search); only set if this * download was started from a search result. */ void *sctx; @@ -1031,7 +1031,7 @@ struct GNUNET_FS_ProgressInfo uint64_t data_len; /** - * Depth of the given block in the tree; + * Depth of the given block in the tree; * 0 would be the lowest level (DBLOCKS). */ unsigned int depth; @@ -1266,7 +1266,7 @@ struct GNUNET_FS_ProgressInfo * These values are only valid for * GNUNET_FS_STATUS_SEARCH_RESULT_SUSPEND events. * These events are automatically triggered for - * each search result before the + * each search result before the * GNUNET_FS_STATUS_SEARCH_SUSPEND event. This * happens primarily to give the client a chance * to clean up the "cctx" (if needed). @@ -1296,7 +1296,7 @@ struct GNUNET_FS_ProgressInfo * These values are only valid for * GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED events. * These events are automatically triggered for - * each search result before the + * each search result before the * GNUNET_FS_STATUS_SEARCH_STOPPED event. This * happens primarily to give the client a chance * to clean up the "cctx" (if needed). @@ -1468,7 +1468,7 @@ struct GNUNET_FS_ProgressInfo uint64_t data_len; /** - * Depth of the given block in the tree; + * Depth of the given block in the tree; * 0 would be the lowest level (DBLOCKS). */ unsigned int depth; @@ -1518,9 +1518,9 @@ struct GNUNET_FS_ProgressInfo /** - * Notification of FS to a client about the progress of an + * Notification of FS to a client about the progress of an * operation. Callbacks of this type will be used for uploads, - * downloads and searches. Some of the arguments depend a bit + * downloads and searches. Some of the arguments depend a bit * in their meaning on the context in which the callback is used. * * @param cls closure @@ -1661,7 +1661,7 @@ struct GNUNET_FS_Handle; * Setup a connection to the file-sharing service. * * @param cfg configuration to use - * @param client_name unique identifier for this client + * @param client_name unique identifier for this client * @param upcb function to call to notify about FS actions * @param upcb_cls closure for upcb * @param flags specific attributes for fs-operations @@ -1806,7 +1806,7 @@ GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h, * @param offset offset to read from; it is possible * that the caller might need to go backwards * a bit at times - * @param max maximum number of bytes that should be + * @param max maximum number of bytes that should be * copied to buf; readers are not allowed * to provide less data unless there is an error; * a value of "0" will be used at the end to allow @@ -1825,7 +1825,7 @@ typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max, * @param h handle to the file sharing subsystem * @param client_info initial client-info value for this entry * @param length length of the file - * @param reader function that can be used to obtain the data for the file + * @param reader function that can be used to obtain the data for the file * @param reader_cls closure for "reader" * @param keywords under which keywords should this file be available * directly; can be NULL @@ -1855,7 +1855,7 @@ GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h, * for each entry in the directory. * * @param cls closure - * @param filename name of the file (including path); must end + * @param filename name of the file (including path); must end * in a "/" (even on W32) if this is a directory * @param fi information about the file (should not be * used henceforth by the caller) @@ -1866,7 +1866,7 @@ typedef void (*GNUNET_FS_FileProcessor) (void *cls, const char *filename, /** * Type of a function that will be used to scan a directory. - * + * * @param cls closure * @param h handle to the file sharing subsystem * @param dirname name of the directory to scan @@ -1991,7 +1991,7 @@ GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation * * @param dir the directory * @param ent the entry to add; the entry must not have been - * added to any other directory at this point and + * added to any other directory at this point and * must not include "dir" in its structure * @return GNUNET_OK on success, GNUNET_SYSERR on error */ @@ -2062,9 +2062,9 @@ enum GNUNET_FS_PublishOptions * @param namespace namespace to publish the file in, NULL for no namespace * @param nid identifier to use for the publishd content in the namespace * (can be NULL, must be NULL if namespace is NULL) - * @param nuid update-identifier that will be used for future updates + * @param nuid update-identifier that will be used for future updates * (can be NULL, must be NULL if namespace or nid is NULL) - * @param options options for the publication + * @param options options for the publication * @return context that can be used to control the publish operation */ struct GNUNET_FS_PublishContext * @@ -2076,7 +2076,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, /** - * Stop a publication. Will abort incomplete publications (but + * Stop a publication. Will abort incomplete publications (but * not remove blocks that have already been published) or * simply clean up the state for completed publications. * Must NOT be called from within the event callback! @@ -2183,7 +2183,7 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, * @param h handle to the file sharing subsystem * @param filename file to unindex * @param cctx initial value for the client context - * @return NULL on error, otherwise handle + * @return NULL on error, otherwise handle */ struct GNUNET_FS_UnindexContext * GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename, @@ -2200,7 +2200,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc); /** - * Publish an advertismement for a namespace. + * Publish an advertismement for a namespace. * * @param h handle to the file sharing subsystem * @param ksk_uri keywords to use for advertisment @@ -2280,7 +2280,7 @@ GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h, * Function called on updateable identifiers. * * @param cls closure - * @param last_id last identifier + * @param last_id last identifier * @param last_uri uri used for the content published under the last_id * @param last_meta metadata associated with last_uri * @param next_id identifier that should be used for updates @@ -2298,12 +2298,12 @@ typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id, * produce an update. Namespace updates form a graph where each node * has a name. Each node can have any number of URI/meta-data entries * which can each be linked to other nodes. Cycles are possible. - * + * * Calling this function with "next_id" NULL will cause the library to * call "ip" with a root for each strongly connected component of the * graph (a root being a node from which all other nodes in the Scc * are reachable). - * + * * Calling this function with "next_id" being the name of a node will * cause the library to call "ip" with all children of the node. Note * that cycles within an SCC are possible (including self-loops). @@ -2356,7 +2356,7 @@ GNUNET_FS_search_start (struct GNUNET_FS_Handle *h, /** - * Pause search. + * Pause search. * * @param sc context for the search that should be paused */ @@ -2541,7 +2541,7 @@ GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData /** * Set the MIMETYPE information for the given * metadata to "application/gnunet-directory". - * + * * @param md metadata to add mimetype to */ void @@ -2550,7 +2550,7 @@ GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md); /** * Suggest a filename based on given metadata. - * + * * @param md given meta data * @return NULL if meta data is useless for suggesting a filename */ @@ -2617,7 +2617,7 @@ struct GNUNET_FS_DirectoryBuilder; /** * Create a directory builder. - * + * * @param mdir metadata for the directory */ struct GNUNET_FS_DirectoryBuilder * @@ -2627,7 +2627,7 @@ GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData /** * Add an entry to a directory. - * + * * @param bld directory to extend * @param uri uri of the entry (must not be a KSK) * @param md metadata of the entry diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index e6afa2b3c8..2f4f4c32ba 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h @@ -250,7 +250,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, /** - * Set an option of type 'int' from the command line to 1 if the + * Set an option of type 'int' from the command line to 1 if the * given option is present. * A pointer to this function should be passed as part of the * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options @@ -261,7 +261,7 @@ GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param scls additional closure (will point to the 'int') * @param option name of the option * @param value not used (NULL) - * @return GNUNET_OK + * @return GNUNET_OK */ int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, @@ -280,7 +280,7 @@ GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * which will be allocated) * @param option name of the option * @param value actual value of the option (a string) - * @return GNUNET_OK + * @return GNUNET_OK */ int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, @@ -298,7 +298,7 @@ GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param scls additional closure (will point to the 'int') * @param option name of the option * @param value not used (NULL) - * @return GNUNET_OK + * @return GNUNET_OK */ int GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index 556b41d3c7..0ec1be7d12 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h @@ -130,9 +130,9 @@ GNUNET_HELLO_merge (const struct GNUNET_HELLO_Message *h1, * @param h2 the second HELLO message * @param now time to use for deciding which addresses have * expired and should not be considered at all - * @return absolute time forever if the two HELLOs are + * @return absolute time forever if the two HELLOs are * totally identical; smallest timestamp >= now if - * they only differ in timestamps; + * they only differ in timestamps; * zero if the some addresses with expirations >= now * do not match at all */ diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index bea7064786..bf43c82899 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h @@ -135,7 +135,7 @@ typedef uint32_t GNUNET_MESH_ApplicationType; * messages if the client does not process them fast enough (for this * notification type, a bounded queue is used) * @param stypes Application Types the client claims to offer - * @return handle to the mesh service + * @return handle to the mesh service * NULL on error (in this case, init is never called) */ struct GNUNET_MESH_Handle * @@ -146,7 +146,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, /** * Get the peer on the other side of this tunnel if it is just one. Return NULL otherwise - * + * * @param tunnel the tunnel * @return the peer or NULL */ @@ -309,7 +309,7 @@ GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *h, /** * Cancel a pending request to connect to a particular peer. Destroys the - * tunnel. + * tunnel. * * @param req request handle that was returned for the original request */ @@ -333,7 +333,7 @@ struct GNUNET_MESH_TransmitHandle; * @param cork is corking allowed for this transmission? * @param priority how important is the message? * @param maxdelay how long can the message wait? - * @param target destination for the message, NULL for multicast to all tunnel targets + * @param target destination for the message, NULL for multicast to all tunnel targets * @param notify_size how many bytes of buffer space does notify want? * @param notify function to call when buffer space is available; * will be called with NULL on timeout or if the overall queue diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 83addfce5a..d0be4ee771 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h @@ -257,14 +257,14 @@ struct GNUNET_MESH_TransmitHandle; /** * Ask the mesh to call "notify" once it is ready to transmit the - * given number of bytes to the specified tunnel or target. + * given number of bytes to the specified tunnel or target. * * @param tunnel tunnel to use for transmission * @param cork is corking allowed for this transmission? * @param priority how important is the message? * @param maxdelay how long can the message wait? * @param target destination for the message - * NULL for multicast to all tunnel targets + * NULL for multicast to all tunnel targets * @param notify_size how many bytes of buffer space does notify want? * @param notify function to call when buffer space is available; * will be called with NULL on timeout or if the overall queue diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h index c521a560cd..6c1db80431 100644 --- a/src/include/gnunet_nat_lib.h +++ b/src/include/gnunet_nat_lib.h @@ -84,7 +84,7 @@ struct GNUNET_NAT_Handle; * @param reversal_callback function to call if someone wants connection reversal from us, * NULL if connection reversal is not supported * @param callback_cls closure for callback - * @return NULL on error, otherwise handle that can be used to unregister + * @return NULL on error, otherwise handle that can be used to unregister */ struct GNUNET_NAT_Handle * GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, @@ -145,7 +145,7 @@ struct GNUNET_NAT_Test; * * @param cls closure * @param success GNUNET_OK on success, GNUNET_NO on failure, - * GNUNET_SYSERR if the test could not be + * GNUNET_SYSERR if the test could not be * properly started (internal failure) */ typedef void (*GNUNET_NAT_TestCallback) (void *cls, int success); @@ -227,7 +227,7 @@ struct GNUNET_NAT_MiniHandle; * general-purpose 'GNUNET_NAT_register' code). However, it can be * used if specifically UPnP-based NAT traversal is to be used or * tested. - * + * * @param port port to map * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP * @param ac function to call with mapping result @@ -244,7 +244,7 @@ GNUNET_NAT_mini_map_start (uint16_t port, int is_tcp, * this function will give 'upnpc' 1s to remove tha mapping, * so while this function is non-blocking, a task will be * left with the scheduler for up to 1s past this call. - * + * * @param mini the handle */ void diff --git a/src/include/gnunet_nse_service.h b/src/include/gnunet_nse_service.h index 451f2a2dcf..a0c6016a40 100644 --- a/src/include/gnunet_nse_service.h +++ b/src/include/gnunet_nse_service.h @@ -70,7 +70,7 @@ typedef void (*GNUNET_NSE_Callback) (void *cls, * Convert the logarithmic estimated returned to the 'GNUNET_NSE_Callback' * into an absolute estimate in terms of the number of peers in the network. * - * @param loge logarithmic estimate + * @param loge logarithmic estimate * @return absolute number of peers in the network (estimated) */ #define GNUNET_NSE_log_estimate_to_n(loge) pow(2.0, (loge)) diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index 9d611af9b9..31062bd403 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h @@ -356,7 +356,7 @@ GNUNET_OS_install_parent_control_handler (void *cls, * PATH environment variable as a search path. * * @param binary the name of the file to check - * @return GNUNET_YES if the file is SUID, + * @return GNUNET_YES if the file is SUID, * GNUNET_NO if not SUID (but binary exists) * GNUNET_SYSERR on error (no such binary or not executable) */ diff --git a/src/include/gnunet_peer_lib.h b/src/include/gnunet_peer_lib.h index 89413aa598..0121e84537 100644 --- a/src/include/gnunet_peer_lib.h +++ b/src/include/gnunet_peer_lib.h @@ -80,7 +80,7 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta); /** * Decrement multiple RCs of peer identities by one. - * + * * @param ids array of PIDs to decrement the RCs of * @param count size of the ids array */ diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h index 50bbc458ab..158eae6022 100644 --- a/src/include/gnunet_peerinfo_service.h +++ b/src/include/gnunet_peerinfo_service.h @@ -73,7 +73,7 @@ GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h); /** - * Add a host to the persistent list. This method operates in + * Add a host to the persistent list. This method operates in * semi-reliable mode: if the transmission is not completed by * the time 'GNUNET_PEERINFO_disconnect' is called, it will be * aborted. Furthermore, if a second HELLO is added for the @@ -116,15 +116,15 @@ struct GNUNET_PEERINFO_IteratorContext; * host and then finally once with a NULL pointer. After that final * invocation, the iterator context must no longer be used. * - * Instead of calling this function with 'peer == NULL' + * Instead of calling this function with 'peer == NULL' * it is often better to use 'GNUNET_PEERINFO_notify'. - * + * * @param h handle to the peerinfo service * @param peer restrict iteration to this peer only (can be NULL) * @param timeout how long to wait until timing out * @param callback the method to call for each peer * @param callback_cls closure for callback - * @return NULL on error (in this case, 'callback' is never called!), + * @return NULL on error (in this case, 'callback' is never called!), * otherwise an iterator context */ struct GNUNET_PEERINFO_IteratorContext * diff --git a/src/include/gnunet_plugin_lib.h b/src/include/gnunet_plugin_lib.h index fbc7e26174..d143a6ccfd 100644 --- a/src/include/gnunet_plugin_lib.h +++ b/src/include/gnunet_plugin_lib.h @@ -54,7 +54,7 @@ typedef void *(*GNUNET_PLUGIN_Callback) (void *arg); * Test if a plugin exists. * * Note that the library must export a symbol called - * "library_name_init" for the test to succeed. + * "library_name_init" for the test to succeed. * * @param library_name name of the plugin to test if it is installed * @return GNUNET_YES if the plugin exists, GNUNET_NO if not diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index c12a849ceb..5f3ab25cee 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -36,7 +36,7 @@ extern "C" #endif /******************************************************************************* - * UTIL message types + * UTIL message types ******************************************************************************/ /** @@ -45,7 +45,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_TEST 1 /******************************************************************************* - * RESOLVER message types + * RESOLVER message types ******************************************************************************/ /** @@ -59,7 +59,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE 5 /******************************************************************************* - * ARM message types + * ARM message types ******************************************************************************/ /** @@ -100,7 +100,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN_ACK 14 /******************************************************************************* - * HELLO message types + * HELLO message types ******************************************************************************/ /** @@ -110,7 +110,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_HELLO 16 /******************************************************************************* - * FRAGMENTATION message types + * FRAGMENTATION message types ******************************************************************************/ /** @@ -126,7 +126,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_FRAGMENT_ACK 19 /******************************************************************************* - * TRANSPORT message types + * TRANSPORT message types ******************************************************************************/ /** @@ -242,7 +242,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 39 /******************************************************************************* - * Transport-WLAN message types + * Transport-WLAN message types ******************************************************************************/ /** @@ -269,7 +269,7 @@ extern "C" /******************************************************************************* - * Transport-DV message types + * Transport-DV message types ******************************************************************************/ /** @@ -313,7 +313,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_DV_DISCONNECT 50 /******************************************************************************* - * Transport-UDP message types + * Transport-UDP message types ******************************************************************************/ /** @@ -327,7 +327,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_ACK 57 /******************************************************************************* - * Transport-TCP message types + * Transport-TCP message types ******************************************************************************/ /** @@ -347,7 +347,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_TRANSPORT_ATS 62 /******************************************************************************* - * NAT message types + * NAT message types ******************************************************************************/ /** @@ -356,7 +356,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_NAT_TEST 63 /******************************************************************************* - * CORE message types + * CORE message types ******************************************************************************/ /** @@ -484,7 +484,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_CORE_BINARY_TYPE_MAP 87 /******************************************************************************* - * DATASTORE message types + * DATASTORE message types ******************************************************************************/ /** @@ -554,7 +554,7 @@ extern "C" /******************************************************************************* - * FS message types + * FS message types ******************************************************************************/ /** @@ -621,7 +621,7 @@ extern "C" /******************************************************************************* - * DHT message types + * DHT message types ******************************************************************************/ /** @@ -706,7 +706,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_DHT_MALICIOUS_DROP 156 /******************************************************************************* - * HOSTLIST message types + * HOSTLIST message types ******************************************************************************/ /** @@ -716,7 +716,7 @@ extern "C" /******************************************************************************* - * STATISTICS message types + * STATISTICS message types ******************************************************************************/ /** @@ -752,7 +752,7 @@ extern "C" /******************************************************************************* - * VPN message types + * VPN message types ******************************************************************************/ /** @@ -802,7 +802,7 @@ extern "C" /******************************************************************************* - * VPN-DNS message types + * VPN-DNS message types ******************************************************************************/ /** diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h index 138375fe1d..bde98ef8ff 100644 --- a/src/include/gnunet_pseudonym_lib.h +++ b/src/include/gnunet_pseudonym_lib.h @@ -83,7 +83,7 @@ GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, /** * List all known pseudonyms. * - * @param cfg overall configuration + * @param cfg overall configuration * @param iterator function to call for each pseudonym * @param closure closure for iterator * @return number of pseudonyms found diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index 0f80b9cee5..9b8c57ff3b 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h @@ -256,7 +256,7 @@ GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p); /** * Obtain the reason code for why the current task was - * started. Will return the same value as + * started. Will return the same value as * the GNUNET_SCHEDULER_TaskContext's reason field. * * * @return reason(s) why the current task is run diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index 45da3efa28..682a265ff5 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h @@ -135,7 +135,7 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access, * @param access function for access control * @param access_cls closure for access * @param serverAddr address toes listen on (including port), NULL terminated array - * @param socklen lengths of respective serverAddr + * @param socklen lengths of respective serverAddr * @param idle_timeout after how long should we timeout idle connections? * @param require_found if YES, connections sending messages of unknown type * will be closed @@ -352,7 +352,7 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, * Ask the server to notify us whenever a client disconnects. * This function is called whenever the actual network connection * is closed; the reference count may be zero or larger than zero - * at this point. If the server is destroyed before this + * at this point. If the server is destroyed before this * notification is explicitly cancelled, the 'callback' will * once be called with a 'client' argument of NULL to indicate * that the server itself is now gone (and that the callback @@ -609,7 +609,7 @@ GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb, * can be NULL (will be passed back to 'cb') * @param buf input data to add * @param size number of bytes in buf - * @param purge should any excess bytes in the buffer be discarded + * @param purge should any excess bytes in the buffer be discarded * (i.e. for packet-based services like UDP) * @param one_shot only call callback once, keep rest of message in buffer * @return GNUNET_OK if we are done processing (need more data) diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h index c246e7cdae..11796d7815 100644 --- a/src/include/gnunet_statistics_service.h +++ b/src/include/gnunet_statistics_service.h @@ -143,7 +143,7 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, /** - * Cancel a 'get' request. Must be called before the 'cont' + * Cancel a 'get' request. Must be called before the 'cont' * function is called. * * @param gh handle of the request to cancel diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 1f157631fc..f8afdae415 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h @@ -253,7 +253,7 @@ GNUNET_TIME_absolute_get_remaining (struct GNUNET_TIME_Absolute future); /** - * Calculate the estimate time of arrival/completion + * Calculate the estimate time of arrival/completion * for an operation. * * @param start when did the operation start? @@ -363,7 +363,7 @@ GNUNET_TIME_relative_subtract (struct GNUNET_TIME_Relative a1, /** * Convert relative time to network byte order. - * + * * @param a time to convert * @return converted time value */ diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index d7ca622190..bc5b791d58 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h @@ -74,9 +74,9 @@ struct SessionHeader * use NULL wherever a session pointer is needed. This function * should be called BEFORE a potential "TransmitContinuation" * from the "TransmitFunction". - * + * * @param cls closure - * @param peer which peer was the session for + * @param peer which peer was the session for * @param session which session is being destoyed */ typedef void (*GNUNET_TRANSPORT_SessionEnd) (void *cls, @@ -393,14 +393,14 @@ typedef int (*GNUNET_TRANSPORT_CheckAddress) (void *cls, const void *addr, /** * Function called for a quick conversion of the binary address to - * a numeric address. Note that the caller must not free the + * a numeric address. Note that the caller must not free the * address and that the next call to this function is allowed * to override the address again. * * @param cls closure * @param addr binary address * @param addr_len length of the address - * @return string representing the same address + * @return string representing the same address */ typedef const char *(*GNUNET_TRANSPORT_AddressToString) (void *cls, const void *addr, @@ -431,7 +431,7 @@ struct GNUNET_TRANSPORT_PluginFunctions /** * Function that can be used to force the plugin to disconnect from * the given peer and cancel all previous transmissions (and their - * continuations). + * continuations). */ GNUNET_TRANSPORT_DisconnectFunction disconnect; diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 988d557846..e90acab4d2 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h @@ -486,7 +486,7 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle); /** - * Ask the transport service to establish a connection to + * Ask the transport service to establish a connection to * the given peer. * * @param handle connection to transport service @@ -621,7 +621,7 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, * @param cfg configuration to use * @param address address to convert (binary format) * @param addressLen number of bytes in address - * @param numeric should (IP) addresses be displayed in numeric form + * @param numeric should (IP) addresses be displayed in numeric form * (otherwise do reverse DNS lookup) * @param nameTrans name of the transport to which the address belongs * @param timeout how long is the lookup allowed to take at most diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index a5c9b131a0..fdc0007edd 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -33,7 +33,7 @@ * - MESH LOCAL HANDLER HELPERS * - MESH LOCAL HANDLES * - MAIN FUNCTIONS (main & run) - * + * * TODO: * - error reporting (CREATE/CHANGE/ADD/DEL?) -- new message! * - partial disconnect reporting -- same as error reporting? @@ -797,7 +797,7 @@ destroy_tunnel (struct MeshTunnel *t) /** * Periodically announce what applications are provided by local clients - * + * * @param cls closure * @param tc task context */ @@ -844,7 +844,7 @@ announce_applications (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Periodically announce self id in the DHT - * + * * @param cls closure * @param tc task context */ @@ -1199,7 +1199,7 @@ send_p2p_tunnel_destroy (void *cls, size_t size, void *buf) /** * Send the message to all clients that have subscribed to its type - * + * * @param msg Pointer to the message itself * @return number of clients this message was sent to */ @@ -1294,7 +1294,8 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, struct MeshPeerInfo *orig_peer_info; struct MeshTunnel *t; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Received a MESH path create msg\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "MESH: Received a MESH path create msg\n"); size = ntohs (message->size); if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) { @@ -2057,7 +2058,7 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) /** * Handler for new clients - * + * * @param cls closure * @param client identification of the client * @param message the actual message, which includes messages the client wants @@ -2137,8 +2138,9 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client, } } } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: client has %u+%u subscriptions\n", - c->type_counter, c->app_counter); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "MESH: client has %u+%u subscriptions\n", c->type_counter, + c->app_counter); GNUNET_CONTAINER_DLL_insert (clients, clients_tail, c); c->tunnels = GNUNET_CONTAINER_multihashmap_create (32); @@ -2151,7 +2153,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for requests of new tunnels - * + * * @param cls closure * @param client identification of the client * @param message the actual message @@ -2233,7 +2235,7 @@ handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for requests of deleting tunnels - * + * * @param cls closure * @param client identification of the client * @param message the actual message @@ -2286,7 +2288,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for connection requests to new peers - * + * * @param cls closure * @param client identification of the client * @param message the actual message (PeerControl) @@ -2359,7 +2361,7 @@ handle_local_connect_add (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for disconnection requests of peers in a tunnel - * + * * @param cls closure * @param client identification of the client * @param message the actual message (PeerControl) @@ -2418,7 +2420,7 @@ handle_local_connect_del (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for connection requests to new peers by type - * + * * @param cls closure * @param client identification of the client * @param message the actual message (ConnectPeerByType) @@ -2515,7 +2517,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for client traffic directed to one peer - * + * * @param cls closure * @param client identification of the client * @param message the actual message @@ -2608,7 +2610,7 @@ handle_local_unicast (void *cls, struct GNUNET_SERVER_Client *client, /** * Handler for client traffic directed to all peers in a tunnel - * + * * @param cls closure * @param client identification of the client * @param message the actual message @@ -2807,9 +2809,10 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_SERVER_notification_context_destroy (nc); nc = NULL; } - if (0 != announce_id_task) { - GNUNET_SCHEDULER_cancel(announce_id_task); - announce_id_task = 0; + if (0 != announce_id_task) + { + GNUNET_SCHEDULER_cancel (announce_id_task); + announce_id_task = 0; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: shut down\n"); } diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index 116e7a7773..b9f2226b9f 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h @@ -36,7 +36,7 @@ /* Any API call should be documented in the folowing table under API CALL. * Also, any message type should be documented in the following table, with the * associated event. - * + * * API CALL (GNUNET_MESH_*) MESSAGE USED * ------------------------ ------------ * connect GNUNET_MESH_ClientConnect @@ -51,9 +51,9 @@ * * notify_transmit_ready *GNUNET_MESH_TransmitReady?* * notify_transmit_ready_cancel None (clear of internal data structures) - * - * - * + * + * + * * EVENT MESSAGE USED * ----- ------------ * data GNUNET_MESH_Data OR @@ -135,8 +135,8 @@ struct GNUNET_MESH_PeerControl * (client to service, client created tunnel) * GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_[CONNECTED|DISCONNECTED] * (service to client) - * - * Size: sizeof(struct GNUNET_MESH_PeerControl) + * + * Size: sizeof(struct GNUNET_MESH_PeerControl) */ struct GNUNET_MessageHeader header; @@ -168,7 +168,7 @@ struct GNUNET_MESH_ConnectPeerByType MESH_TunnelNumber tunnel_id GNUNET_PACKED; /** - * Type specification + * Type specification */ GNUNET_MESH_ApplicationType type GNUNET_PACKED; }; diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 3a50e44ee8..0edb6eb0cb 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -673,7 +673,7 @@ core_notify (void *cls, size_t size, void *buf) * @param cork is corking allowed for this transmission? * @param priority how important is the message? * @param maxdelay how long can the message wait? - * @param target destination for the message, NULL for multicast to all tunnel targets + * @param target destination for the message, NULL for multicast to all tunnel targets * @param notify_size how many bytes of buffer space does notify want? * @param notify function to call when buffer space is available; * will be called with NULL on timeout or if the overall queue diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c index 0540c765ba..e6e6fdaa82 100644 --- a/src/mesh/mesh_api_new.c +++ b/src/mesh/mesh_api_new.c @@ -22,7 +22,7 @@ * @file mesh/mesh_api_new.c * @brief mesh api: client implementation of mesh service * @author Bartlomiej Polot - * + * * STRUCTURE: * - CONSTANTS * - DATA STRUCTURES @@ -193,7 +193,7 @@ retrieve_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid) /** * Process the new tunnel notification and add it to the tunnels in the handle - * + * * @param h The mesh handle * @param msg A message with the details of the new incoming tunnel */ @@ -201,30 +201,30 @@ static void process_tunnel_create (struct GNUNET_MESH_Handle *h, const struct GNUNET_MESH_TunnelMessage *msg) { - struct GNUNET_MESH_Tunnel *t; - MESH_TunnelNumber tid; + struct GNUNET_MESH_Tunnel *t; + MESH_TunnelNumber tid; - tid = ntohl (msg->tunnel_id); - if (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK) - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "MESH: received an incoming tunnel with tid in local range (%X)\n", - tid); - GNUNET_break_op (0); - return; //FIXME abort? reconnect? - } - t = GNUNET_malloc (sizeof (struct GNUNET_MESH_Tunnel)); - t->cls = h->cls; - t->mesh = h; - t->tid = tid; + tid = ntohl (msg->tunnel_id); + if (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "MESH: received an incoming tunnel with tid in local range (%X)\n", + tid); + GNUNET_break_op (0); + return; //FIXME abort? reconnect? + } + t = GNUNET_malloc (sizeof (struct GNUNET_MESH_Tunnel)); + t->cls = h->cls; + t->mesh = h; + t->tid = tid; - return; + return; } /** * Process the new peer event and notify the upper level of it - * + * * @param h The mesh handle * @param msg A message with the details of the peer event */ @@ -232,41 +232,41 @@ static void process_peer_event (struct GNUNET_MESH_Handle *h, const struct GNUNET_MESH_PeerControl *msg) { - struct GNUNET_MESH_Tunnel *t; - uint16_t size; + struct GNUNET_MESH_Tunnel *t; + uint16_t size; - size = ntohs (msg->header.size); - if (size != sizeof (struct GNUNET_MESH_PeerControl)) - { - GNUNET_break_op (0); - return; - } - t = retrieve_tunnel (h, ntohl (msg->tunnel_id)); - if (NULL == t) - { - GNUNET_break_op (0); - return; - } - if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED == msg->header.type) + size = ntohs (msg->header.size); + if (size != sizeof (struct GNUNET_MESH_PeerControl)) + { + GNUNET_break_op (0); + return; + } + t = retrieve_tunnel (h, ntohl (msg->tunnel_id)); + if (NULL == t) + { + GNUNET_break_op (0); + return; + } + if (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED == msg->header.type) + { + if (NULL != t->connect_handler) { - if (NULL != t->connect_handler) - { - t->connect_handler (t->cls, &msg->peer, NULL); /* FIXME atsi */ - } + t->connect_handler (t->cls, &msg->peer, NULL); /* FIXME atsi */ } - else + } + else + { + if (NULL != t->disconnect_handler) { - if (NULL != t->disconnect_handler) - { - t->disconnect_handler (t->cls, &msg->peer); - } + t->disconnect_handler (t->cls, &msg->peer); } + } } /** * Process the incoming data packets - * + * * @param h The mesh handle * @param msh A message encapsulating the data */ @@ -274,66 +274,66 @@ static void process_incoming_data (struct GNUNET_MESH_Handle *h, const struct GNUNET_MessageHeader *message) { - const struct GNUNET_MessageHeader *payload; - const struct GNUNET_MESH_MessageHandler *handler; - const struct GNUNET_PeerIdentity *peer; - struct GNUNET_MESH_Unicast *ucast; - struct GNUNET_MESH_Multicast *mcast; - struct GNUNET_MESH_ToOrigin *to_orig; - struct GNUNET_MESH_Tunnel *t; - uint16_t type; - int i; - - type = ntohs (message->type); - switch (type) - { - case GNUNET_MESSAGE_TYPE_MESH_UNICAST: - ucast = (struct GNUNET_MESH_Unicast *) message; - t = retrieve_tunnel (h, ntohl (ucast->tid)); - payload = (struct GNUNET_MessageHeader *) &ucast[1]; - peer = &ucast->oid; - break; - case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: - mcast = (struct GNUNET_MESH_Multicast *) message; - t = retrieve_tunnel (h, ntohl (mcast->tid)); - payload = (struct GNUNET_MessageHeader *) &mcast[1]; - peer = &mcast->oid; - break; - case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: - to_orig = (struct GNUNET_MESH_ToOrigin *) message; - t = retrieve_tunnel (h, ntohl (to_orig->tid)); - payload = (struct GNUNET_MessageHeader *) &to_orig[1]; - peer = &to_orig->sender; - break; - default: - GNUNET_break_op (0); - return; - } - if (NULL == t) - { - GNUNET_break_op (0); - return; - } - for (i = 0; i < h->n_handlers; i++) + const struct GNUNET_MessageHeader *payload; + const struct GNUNET_MESH_MessageHandler *handler; + const struct GNUNET_PeerIdentity *peer; + struct GNUNET_MESH_Unicast *ucast; + struct GNUNET_MESH_Multicast *mcast; + struct GNUNET_MESH_ToOrigin *to_orig; + struct GNUNET_MESH_Tunnel *t; + uint16_t type; + int i; + + type = ntohs (message->type); + switch (type) + { + case GNUNET_MESSAGE_TYPE_MESH_UNICAST: + ucast = (struct GNUNET_MESH_Unicast *) message; + t = retrieve_tunnel (h, ntohl (ucast->tid)); + payload = (struct GNUNET_MessageHeader *) &ucast[1]; + peer = &ucast->oid; + break; + case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: + mcast = (struct GNUNET_MESH_Multicast *) message; + t = retrieve_tunnel (h, ntohl (mcast->tid)); + payload = (struct GNUNET_MessageHeader *) &mcast[1]; + peer = &mcast->oid; + break; + case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: + to_orig = (struct GNUNET_MESH_ToOrigin *) message; + t = retrieve_tunnel (h, ntohl (to_orig->tid)); + payload = (struct GNUNET_MessageHeader *) &to_orig[1]; + peer = &to_orig->sender; + break; + default: + GNUNET_break_op (0); + return; + } + if (NULL == t) + { + GNUNET_break_op (0); + return; + } + for (i = 0; i < h->n_handlers; i++) + { + handler = &h->message_handlers[i]; + if (handler->type == type) { - handler = &h->message_handlers[i]; - if (handler->type == type) - { - if (GNUNET_OK == handler->callback (h->cls, t, NULL, /* FIXME ctx */ - peer, payload, NULL)) /* FIXME atsi */ - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "MESH: callback completed successfully\n"); - } - else - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "MESH: callback caused disconnection\n"); - GNUNET_MESH_disconnect (h); - } - } + if (GNUNET_OK == handler->callback (h->cls, t, NULL, /* FIXME ctx */ + peer, payload, NULL)) /* FIXME atsi */ + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "MESH: callback completed successfully\n"); + } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "MESH: callback caused disconnection\n"); + GNUNET_MESH_disconnect (h); + } } - return; + } + return; } @@ -346,44 +346,43 @@ process_incoming_data (struct GNUNET_MESH_Handle *h, static void msg_received (void *cls, const struct GNUNET_MessageHeader *msg) { - struct GNUNET_MESH_Handle *h = cls; + struct GNUNET_MESH_Handle *h = cls; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "mesh: received a message from MESH\n"); - if (msg == NULL) - { - GNUNET_break_op (0); - return; - } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: received a message from MESH\n"); + if (msg == NULL) + { + GNUNET_break_op (0); + return; + } - switch (ntohs (msg->type)) - { - /* Notify of a new incoming tunnel */ - case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE: - process_tunnel_create (h, (struct GNUNET_MESH_TunnelMessage *) msg); - break; - /* Notify of a new peer or a peer disconnect in the tunnel */ - case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED: - case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED: - process_peer_event (h, (struct GNUNET_MESH_PeerControl *) msg); - break; - /* Notify of a new data packet in the tunnel */ - case GNUNET_MESSAGE_TYPE_MESH_UNICAST: - case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: - case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: - process_incoming_data (h, msg); - break; - /* We shouldn't get any other packages, log and ignore */ - default: - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "MESH: unsolicited message form service (type %d)\n", - ntohs (msg->type)); - } + switch (ntohs (msg->type)) + { + /* Notify of a new incoming tunnel */ + case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE: + process_tunnel_create (h, (struct GNUNET_MESH_TunnelMessage *) msg); + break; + /* Notify of a new peer or a peer disconnect in the tunnel */ + case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED: + case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED: + process_peer_event (h, (struct GNUNET_MESH_PeerControl *) msg); + break; + /* Notify of a new data packet in the tunnel */ + case GNUNET_MESSAGE_TYPE_MESH_UNICAST: + case GNUNET_MESSAGE_TYPE_MESH_MULTICAST: + case GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN: + process_incoming_data (h, msg); + break; + /* We shouldn't get any other packages, log and ignore */ + default: + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "MESH: unsolicited message form service (type %d)\n", + ntohs (msg->type)); + } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: message processed\n"); - GNUNET_CLIENT_receive (h->client, &msg_received, h, - GNUNET_TIME_UNIT_FOREVER_REL); - return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: message processed\n"); + GNUNET_CLIENT_receive (h->client, &msg_received, h, + GNUNET_TIME_UNIT_FOREVER_REL); + return; } @@ -406,66 +405,65 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg) static size_t send_connect_packet (void *cls, size_t size, void *buf) { - struct GNUNET_MESH_Handle *h = cls; - struct GNUNET_MESH_ClientConnect *msg; - GNUNET_MESH_ApplicationType *apps; - uint16_t napps; - uint16_t *types; - uint16_t ntypes; - - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "mesh: Send connect packet()\n", size); - h->th = NULL; - if (0 == size || NULL == buf) - { - // FIXME: disconnect, reconnect, retry? - return 0; - } - if (sizeof (struct GNUNET_MessageHeader) > size) - { - GNUNET_break(0); - // FIXME: disconnect, reconnect, retry! - return 0; - } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "mesh: Send connect packet: %lu bytes buffer\n", size); - msg = (struct GNUNET_MESH_ClientConnect *) buf; - msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT); - - for (ntypes = 0, types = NULL; ntypes < h->n_handlers; ntypes++) - { - types = GNUNET_realloc (types, sizeof (uint16_t) * (ntypes + 1)); - types[ntypes] = h->message_handlers[ntypes].type; - } + struct GNUNET_MESH_Handle *h = cls; + struct GNUNET_MESH_ClientConnect *msg; + GNUNET_MESH_ApplicationType *apps; + uint16_t napps; + uint16_t *types; + uint16_t ntypes; + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Send connect packet()\n", size); + h->th = NULL; + if (0 == size || NULL == buf) + { + // FIXME: disconnect, reconnect, retry? + return 0; + } + if (sizeof (struct GNUNET_MessageHeader) > size) + { + GNUNET_break (0); + // FIXME: disconnect, reconnect, retry! + return 0; + } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "mesh: Send connect packet: %lu bytes buffer\n", size); + msg = (struct GNUNET_MESH_ClientConnect *) buf; + msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT); - for (napps = 0, apps = NULL; napps < h->n_applications; napps++) - { - apps = - GNUNET_realloc (apps, - sizeof (GNUNET_MESH_ApplicationType) * (napps + 1)); - apps[napps] = h->applications[napps]; - } + for (ntypes = 0, types = NULL; ntypes < h->n_handlers; ntypes++) + { + types = GNUNET_realloc (types, sizeof (uint16_t) * (ntypes + 1)); + types[ntypes] = h->message_handlers[ntypes].type; + } - msg->header.size = - htons (sizeof (struct GNUNET_MESH_ClientConnect) + - sizeof (uint16_t) * ntypes + - sizeof (GNUNET_MESH_ApplicationType) * napps); - memcpy (&msg[1], types, sizeof (uint16_t) * ntypes); - types = (uint16_t *) &msg[1]; - memcpy (&types[ntypes], apps, sizeof (GNUNET_MESH_ApplicationType) * napps); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "mesh: Sent %lu bytes long message %d types and %d apps\n", - ntohs (msg->header.size), ntypes, napps); - msg->applications = htons (napps); - msg->types = htons (ntypes); - - /* start listening */ - GNUNET_CLIENT_receive (h->client, &msg_received, h, - GNUNET_TIME_UNIT_FOREVER_REL); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "mesh: Send connect packet() END\n", size); + for (napps = 0, apps = NULL; napps < h->n_applications; napps++) + { + apps = + GNUNET_realloc (apps, + sizeof (GNUNET_MESH_ApplicationType) * (napps + 1)); + apps[napps] = h->applications[napps]; + } - return ntohs (msg->header.size); + msg->header.size = + htons (sizeof (struct GNUNET_MESH_ClientConnect) + + sizeof (uint16_t) * ntypes + + sizeof (GNUNET_MESH_ApplicationType) * napps); + memcpy (&msg[1], types, sizeof (uint16_t) * ntypes); + types = (uint16_t *) & msg[1]; + memcpy (&types[ntypes], apps, sizeof (GNUNET_MESH_ApplicationType) * napps); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "mesh: Sent %lu bytes long message %d types and %d apps\n", + ntohs (msg->header.size), ntypes, napps); + msg->applications = htons (napps); + msg->types = htons (ntypes); + + /* start listening */ + GNUNET_CLIENT_receive (h->client, &msg_received, h, + GNUNET_TIME_UNIT_FOREVER_REL); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Send connect packet() END\n", + size); + + return ntohs (msg->header.size); } @@ -496,7 +494,7 @@ send_tunnel_create_packet (void *cls, size_t size, void *buf) } if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) { - GNUNET_break(0); + GNUNET_break (0); // FIXME: disconnect, reconnect, retry? return 0; } @@ -529,35 +527,35 @@ send_tunnel_create_packet (void *cls, size_t size, void *buf) static size_t send_tunnel_destroy_packet (void *cls, size_t size, void *buf) { - struct GNUNET_MESH_Tunnel *t = cls; - struct GNUNET_MESH_Handle *h; - struct GNUNET_MESH_TunnelMessage *msg; + struct GNUNET_MESH_Tunnel *t = cls; + struct GNUNET_MESH_Handle *h; + struct GNUNET_MESH_TunnelMessage *msg; - h = t->mesh; - h->th = NULL; - if (0 == size || buf == NULL) - { - return 0; - } - if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) - { - GNUNET_break(0); - // FIXME: disconnect, reconnect, retry! - return 0; - } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Send tunnel destroy packet: %lu bytes buffer\n", size); - msg = (struct GNUNET_MESH_TunnelMessage *) buf; - msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY); + h = t->mesh; + h->th = NULL; + if (0 == size || buf == NULL) + { + return 0; + } + if (sizeof (struct GNUNET_MESH_TunnelMessage) > size) + { + GNUNET_break (0); + // FIXME: disconnect, reconnect, retry! + return 0; + } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Send tunnel destroy packet: %lu bytes buffer\n", size); + msg = (struct GNUNET_MESH_TunnelMessage *) buf; + msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY); - msg->header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage)); - msg->tunnel_id = htonl (t->tid); + msg->header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage)); + msg->tunnel_id = htonl (t->tid); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent %lu bytes long message\n", - ntohs (msg->header.size)); - GNUNET_free(t); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sent %lu bytes long message\n", + ntohs (msg->header.size)); + GNUNET_free (t); - return sizeof (struct GNUNET_MESH_TunnelMessage); + return sizeof (struct GNUNET_MESH_TunnelMessage); } @@ -577,7 +575,7 @@ send_tunnel_destroy_packet (void *cls, size_t size, void *buf) * inbound messages if the client does not process them fast * enough (for this notification type, a bounded queue is used) * @param stypes Application Types the client claims to offer - * @return handle to the mesh service + * @return handle to the mesh service * NULL on error (in this case, init is never called) */ struct GNUNET_MESH_Handle * @@ -586,8 +584,8 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, const struct GNUNET_MESH_MessageHandler *handlers, const GNUNET_MESH_ApplicationType *stypes) { - struct GNUNET_MESH_Handle *h; - size_t size; + struct GNUNET_MESH_Handle *h; + size_t size; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: GNUNET_MESH_connect()\n"); h = GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle)); @@ -596,7 +594,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, h->client = GNUNET_CLIENT_connect ("mesh", cfg); if (h->client == NULL) { - GNUNET_break(0); + GNUNET_break (0); GNUNET_free (h); return NULL; } @@ -613,11 +611,11 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, size += h->n_handlers * sizeof (uint16_t); size += h->n_applications * sizeof (GNUNET_MESH_ApplicationType); - if (NULL != h->th) { - /* FIXME implement queue system instead */ - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, - "mesh: overwriting th of mesh\n"); - GNUNET_CLIENT_notify_transmit_ready_cancel(h->th); + if (NULL != h->th) + { + /* FIXME implement queue system instead */ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "mesh: overwriting th of mesh\n"); + GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); } h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, size, @@ -676,11 +674,11 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, tunnel->mesh = h; tunnel->tid = h->next_tid++; h->next_tid |= GNUNET_MESH_LOCAL_TUNNEL_ID_MARK; // keep in range - if (NULL != h->th) { - /* FIXME implement queue system instead */ - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, - "mesh: overwriting th of mesh\n"); - GNUNET_CLIENT_notify_transmit_ready_cancel(h->th); + if (NULL != h->th) + { + /* FIXME implement queue system instead */ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "mesh: overwriting th of mesh\n"); + GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); } h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, @@ -703,21 +701,21 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, void GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Destroying tunnel\n"); - if (NULL != tun->mesh->th) { - /* FIXME implement queue system instead */ - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, - "mesh: overwriting th of mesh\n"); - GNUNET_CLIENT_notify_transmit_ready_cancel(tun->mesh->th); - } - tun->mesh->th = GNUNET_CLIENT_notify_transmit_ready ( - tun->mesh->client, - sizeof (struct - GNUNET_MESH_TunnelMessage), - GNUNET_TIME_UNIT_FOREVER_REL, - GNUNET_YES, - &send_tunnel_destroy_packet, - (void *) tun); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Destroying tunnel\n"); + if (NULL != tun->mesh->th) + { + /* FIXME implement queue system instead */ + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "mesh: overwriting th of mesh\n"); + GNUNET_CLIENT_notify_transmit_ready_cancel (tun->mesh->th); + } + tun->mesh->th = + GNUNET_CLIENT_notify_transmit_ready (tun->mesh->client, + sizeof (struct + GNUNET_MESH_TunnelMessage), + GNUNET_TIME_UNIT_FOREVER_REL, + GNUNET_YES, + &send_tunnel_destroy_packet, + (void *) tun); } @@ -792,7 +790,7 @@ GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel *tunnel, * @param priority how important is the message? * @param maxdelay how long can the message wait? * @param target destination for the message, - * NULL for multicast to all tunnel targets + * NULL for multicast to all tunnel targets * @param notify_size how many bytes of buffer space does notify want? * @param notify function to call when buffer space is available; * will be called with NULL on timeout or if the overall queue diff --git a/src/mesh/test_mesh_api.c b/src/mesh/test_mesh_api.c index af6b5e3e71..fbef7ee19b 100644 --- a/src/mesh/test_mesh_api.c +++ b/src/mesh/test_mesh_api.c @@ -67,33 +67,33 @@ static struct GNUNET_MESH_MessageHandler handlers[] = { {&callback, 1, 0}, static void do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - fprintf(stderr, "++++++++ STARTING SHUTDOWN\n"); - fprintf(stderr, "+++++++++ ABORT TASK\n"); + fprintf (stderr, "++++++++ STARTING SHUTDOWN\n"); + fprintf (stderr, "+++++++++ ABORT TASK\n"); if (0 != abort_task) { GNUNET_SCHEDULER_cancel (abort_task); } - fprintf(stderr, "+++++++++ DISCONNECT MESH\n"); + fprintf (stderr, "+++++++++ DISCONNECT MESH\n"); if (NULL != mesh) { GNUNET_MESH_disconnect (mesh); } - fprintf(stderr, "+++++++++ KILL PROCESS\n"); + fprintf (stderr, "+++++++++ KILL PROCESS\n"); if (0 != GNUNET_OS_process_kill (arm_pid, SIGTERM)) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); } - fprintf(stderr, "+++++++++ WAIT\n"); + fprintf (stderr, "+++++++++ WAIT\n"); GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (arm_pid)); - fprintf(stderr, "+++++++++ PROCESS CLOSE\n"); + fprintf (stderr, "+++++++++ PROCESS CLOSE\n"); GNUNET_OS_process_close (arm_pid); - fprintf(stderr, "++++++++ END SHUTDOWN\n"); + fprintf (stderr, "++++++++ END SHUTDOWN\n"); } static void do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - fprintf(stderr, "++++++++ STARTING ABORT\n"); + fprintf (stderr, "++++++++ STARTING ABORT\n"); if (0 != test_task) { GNUNET_SCHEDULER_cancel (test_task); @@ -101,16 +101,16 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) result = GNUNET_SYSERR; abort_task = 0; do_shutdown (cls, tc); - fprintf(stderr, "++++++++ END ABORT\n"); + fprintf (stderr, "++++++++ END ABORT\n"); } static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct GNUNET_CONFIGURATION_Handle *cfg = cls; - static const GNUNET_MESH_ApplicationType app[] = {1,2,3,0}; + static const GNUNET_MESH_ApplicationType app[] = { 1, 2, 3, 0 }; - fprintf(stderr, "++++++++ STARTING TEST\n"); + fprintf (stderr, "++++++++ STARTING TEST\n"); test_task = (GNUNET_SCHEDULER_TaskIdentifier) 0; mesh = GNUNET_MESH_connect (cfg, NULL, NULL, handlers, app); if (NULL == mesh) @@ -123,8 +123,10 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "YAY! CONNECTED TO MESH :D\n"); } - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3), &do_shutdown, NULL); - fprintf(stderr, "++++++++ END TEST\n"); + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply + (GNUNET_TIME_UNIT_SECONDS, 3), &do_shutdown, + NULL); + fprintf (stderr, "++++++++ END TEST\n"); } @@ -132,14 +134,14 @@ static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - fprintf(stderr, "++++++++ STARTING RUN\n"); + fprintf (stderr, "++++++++ STARTING RUN\n"); GNUNET_log_setup ("test_mesh_small", #if VERBOSE - "DEBUG", + "DEBUG", #else - "WARNING", + "WARNING", #endif - NULL); + NULL); arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", "gnunet-service-arm", @@ -152,10 +154,12 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20), &do_abort, NULL); - test_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &test, (void *)cfg); + test_task = + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &test, + (void *) cfg); // GNUNET_SCHEDULER_add_now (&test, (void *)cfg); - fprintf(stderr, "++++++++ END RUN\n"); + fprintf (stderr, "++++++++ END RUN\n"); } @@ -163,6 +167,7 @@ int main (int argc, char *argv[]) { int ret; + char *const argv2[] = { "test-mesh-api", "-c", "test_mesh.conf", #if VERBOSE @@ -174,7 +179,7 @@ main (int argc, char *argv[]) GNUNET_GETOPT_OPTION_END }; - fprintf(stderr, "++++++++ STARTING TEST_API\n"); + fprintf (stderr, "++++++++ STARTING TEST_API\n"); ret = GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2, "test-mesh-api", "nohelp", options, &run, NULL); @@ -191,6 +196,6 @@ main (int argc, char *argv[]) return 1; } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test ok\n"); - fprintf(stderr, "++++++++ END TEST_API\n"); + fprintf (stderr, "++++++++ END TEST_API\n"); return 0; } diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 30b2d8aeff..6234d03590 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c @@ -48,7 +48,7 @@ struct StatsContext // static struct MeshPeer *peer_head; -// +// // static struct MeshPeer *peer_tail; /** @@ -180,7 +180,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (data_file != NULL) GNUNET_DISK_file_close (data_file); GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); - GNUNET_CONFIGURATION_destroy(testing_cfg); + GNUNET_CONFIGURATION_destroy (testing_cfg); } @@ -189,7 +189,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) */ static struct GNUNET_MESH_MessageHandler handlers[] = { // {&callback, 1, 0}, - {NULL, 0, 0} + {NULL, 0, 0} }; @@ -203,15 +203,13 @@ static struct GNUNET_MESH_MessageHandler handlers[] = { * with the tunnel is stored */ static void -tunnel_cleaner (void *cls, - const struct GNUNET_MESH_Tunnel * tunnel, +tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx) { #if VERBOSE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "tunnel disconnected\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tunnel disconnected\n"); #endif - return; + return; } /** @@ -223,9 +221,8 @@ tunnel_cleaner (void *cls, static void dh (void *cls, const struct GNUNET_PeerIdentity *peer) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "peer disconnected\n"); - return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer disconnected\n"); + return; } @@ -237,48 +234,43 @@ dh (void *cls, const struct GNUNET_PeerIdentity *peer) * @param atsi performance data for the connection */ static void -ch (void *cls, - const struct GNUNET_PeerIdentity * peer, - const struct GNUNET_TRANSPORT_ATS_Information * atsi) +ch (void *cls, const struct GNUNET_PeerIdentity *peer, + const struct GNUNET_TRANSPORT_ATS_Information *atsi) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "peer connected\n"); - return; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer connected\n"); + return; } /** * connect_mesh_service: connect to the mesh service of one of the peers - * + * */ static void connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - struct GNUNET_TESTING_Daemon *d; - struct GNUNET_MESH_Handle *h; - struct GNUNET_MESH_Tunnel *t; - GNUNET_MESH_ApplicationType app; + struct GNUNET_TESTING_Daemon *d; + struct GNUNET_MESH_Handle *h; + struct GNUNET_MESH_Tunnel *t; + GNUNET_MESH_ApplicationType app; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "connect_mesh_service\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connect_mesh_service\n"); - d = GNUNET_TESTING_daemon_get(pg, 1); - app = (GNUNET_MESH_ApplicationType) 0; + d = GNUNET_TESTING_daemon_get (pg, 1); + app = (GNUNET_MESH_ApplicationType) 0; #if VERBOSE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "connecting to mesh service of peer %s\n", - GNUNET_i2s(&d->id)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "connecting to mesh service of peer %s\n", GNUNET_i2s (&d->id)); #endif - h = GNUNET_MESH_connect(d->cfg, NULL, &tunnel_cleaner, handlers, &app); + h = GNUNET_MESH_connect (d->cfg, NULL, &tunnel_cleaner, handlers, &app); #if VERBOSE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "connected to mesh service of peer %s\n", - GNUNET_i2s(&d->id)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "connected to mesh service of peer %s\n", + GNUNET_i2s (&d->id)); #endif - t = GNUNET_MESH_tunnel_create(h, &ch, &dh, NULL); - GNUNET_MESH_tunnel_destroy(t); - GNUNET_MESH_disconnect(h); + t = GNUNET_MESH_tunnel_create (h, &ch, &dh, NULL); + GNUNET_MESH_tunnel_destroy (t); + GNUNET_MESH_disconnect (h); } @@ -338,8 +330,8 @@ statistics_iterator (void *cls, const struct GNUNET_PeerIdentity *peer, { struct StatsContext *stats_context = cls; -// -// if ( (0 == strstr(subsystem, "nse")) && +// +// if ( (0 == strstr(subsystem, "nse")) && // (0 == strstr(name, "# flood messages received")) ) stats_context->total_mesh_bytes += 1; //value; return GNUNET_OK; @@ -489,38 +481,38 @@ churn_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) static void peergroup_ready (void *cls, const char *emsg) { - char *buf; - int buf_len; + char *buf; + int buf_len; - if (emsg != NULL) - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Peergroup callback called with error, aborting test!\n"); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error from testing: `%s'\n"); - ok = 1; - GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); - return; - } + if (emsg != NULL) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Peergroup callback called with error, aborting test!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error from testing: `%s'\n"); + ok = 1; + GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); + return; + } #if VERBOSE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer Group started successfully!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer Group started successfully!\n"); #endif - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n", - total_connections); - if (data_file != NULL) - { - buf = NULL; - buf_len = GNUNET_asprintf (&buf, "CONNECTIONS_0: %u\n", total_connections); - if (buf_len > 0) - GNUNET_DISK_file_write (data_file, buf, buf_len); - GNUNET_free (buf); - } - peers_running = GNUNET_TESTING_daemons_running (pg); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Have %u connections\n", + total_connections); + if (data_file != NULL) + { + buf = NULL; + buf_len = GNUNET_asprintf (&buf, "CONNECTIONS_0: %u\n", total_connections); + if (buf_len > 0) + GNUNET_DISK_file_write (data_file, buf, buf_len); + GNUNET_free (buf); + } + peers_running = GNUNET_TESTING_daemons_running (pg); - GNUNET_SCHEDULER_add_now (&connect_mesh_service, NULL); - disconnect_task = - GNUNET_SCHEDULER_add_delayed (wait_time, &disconnect_mesh_peers, NULL); + GNUNET_SCHEDULER_add_now (&connect_mesh_service, NULL); + disconnect_task = + GNUNET_SCHEDULER_add_delayed (wait_time, &disconnect_mesh_peers, NULL); } @@ -563,110 +555,112 @@ static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - char *temp_str; - unsigned long long temp_wait; - struct GNUNET_TESTING_Host *hosts; + char *temp_str; + unsigned long long temp_wait; + struct GNUNET_TESTING_Host *hosts; - ok = 1; - testing_cfg = GNUNET_CONFIGURATION_dup(cfg); + ok = 1; + testing_cfg = GNUNET_CONFIGURATION_dup (cfg); - GNUNET_log_setup ("test_mesh_small", + GNUNET_log_setup ("test_mesh_small", #if VERBOSE - "DEBUG", + "DEBUG", #else - "WARNING", + "WARNING", #endif - NULL); + NULL); #if VERBOSE - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n"); - GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing", - "use_progressbars", "YES"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting daemons.\n"); + GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing", + "use_progressbars", "YES"); #endif + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", + "num_peers", &num_peers)) + { + GNUNET_CONFIGURATION_load (testing_cfg, "test_mesh_small.conf"); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", - "num_peers", &num_peers)) + "num_peers", &num_peers)) { - GNUNET_CONFIGURATION_load(testing_cfg, "test_mesh_small.conf"); - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing", - "num_peers", &num_peers)) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Option TESTING:NUM_PEERS is required!\n"); - return; - } + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Option TESTING:NUM_PEERS is required!\n"); + return; } + } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small", - "wait_time", &temp_wait)) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Option nsetest_mesh_small:wait_time is required!\n"); - return; - } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (testing_cfg, "test_mesh_small", + "wait_time", &temp_wait)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Option nsetest_mesh_small:wait_time is required!\n"); + return; + } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (testing_cfg, "testing", - "topology_output_file", - &topology_file)) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Option test_mesh_small:topology_output_file is required!\n"); - return; - } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (testing_cfg, "testing", + "topology_output_file", + &topology_file)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Option test_mesh_small:topology_output_file is required!\n"); + return; + } - if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", - "data_output_file", - &data_filename)) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Option test_mesh_small:data_output_file is required!\n"); - return; - } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (testing_cfg, "test_mesh_small", + "data_output_file", + &data_filename)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Option test_mesh_small:data_output_file is required!\n"); + return; + } - data_file = GNUNET_DISK_file_open (data_filename, - GNUNET_DISK_OPEN_READWRITE | - GNUNET_DISK_OPEN_CREATE, - GNUNET_DISK_PERM_USER_READ | - GNUNET_DISK_PERM_USER_WRITE); - if (data_file == NULL) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to open %s for output!\n", - data_filename); - GNUNET_free (data_filename); - } + data_file = + GNUNET_DISK_file_open (data_filename, + GNUNET_DISK_OPEN_READWRITE | + GNUNET_DISK_OPEN_CREATE, + GNUNET_DISK_PERM_USER_READ | + GNUNET_DISK_PERM_USER_WRITE); + if (data_file == NULL) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", + data_filename); + GNUNET_free (data_filename); + } - wait_time = - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait); + wait_time = + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait); - if (GNUNET_YES == - GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small", - "output_file", &temp_str)) - { - output_file = GNUNET_DISK_file_open (temp_str, - GNUNET_DISK_OPEN_READWRITE | - GNUNET_DISK_OPEN_CREATE, - GNUNET_DISK_PERM_USER_READ | - GNUNET_DISK_PERM_USER_WRITE); - if (output_file == NULL) - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to open %s for output!\n", - temp_str); - } - GNUNET_free_non_null (temp_str); + if (GNUNET_YES == + GNUNET_CONFIGURATION_get_value_string (cfg, "test_mesh_small", + "output_file", &temp_str)) + { + output_file = + GNUNET_DISK_file_open (temp_str, + GNUNET_DISK_OPEN_READWRITE | + GNUNET_DISK_OPEN_CREATE, + GNUNET_DISK_PERM_USER_READ | + GNUNET_DISK_PERM_USER_WRITE); + if (output_file == NULL) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Failed to open %s for output!\n", + temp_str); + } + GNUNET_free_non_null (temp_str); - hosts = GNUNET_TESTING_hosts_load (testing_cfg); + hosts = GNUNET_TESTING_hosts_load (testing_cfg); - pg = GNUNET_TESTING_peergroup_start (testing_cfg, num_peers, TIMEOUT, - &connect_cb, &peergroup_ready, NULL, hosts); - GNUNET_assert (pg != NULL); - shutdown_handle = GNUNET_SCHEDULER_add_delayed ( - GNUNET_TIME_relative_get_forever (), - &shutdown_task, NULL); + pg = GNUNET_TESTING_peergroup_start (testing_cfg, num_peers, TIMEOUT, + &connect_cb, &peergroup_ready, NULL, + hosts); + GNUNET_assert (pg != NULL); + shutdown_handle = + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_get_forever (), + &shutdown_task, NULL); } @@ -688,13 +682,13 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = { int main (int argc, char *argv[]) { - GNUNET_PROGRAM_run (argc, argv, "test_mesh_small", + GNUNET_PROGRAM_run (argc, argv, "test_mesh_small", gettext_noop ("Test mesh in a small network."), options, &run, NULL); #if REMOVE_DIR - GNUNET_DISK_directory_remove ("/tmp/test_mesh_small"); + GNUNET_DISK_directory_remove ("/tmp/test_mesh_small"); #endif - return ok; + return ok; } /* end of test_mesh_small.c */ diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index 988e9fbc91..5e2390f352 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c @@ -83,7 +83,7 @@ struct TcpContext */ struct GNUNET_NETWORK_Handle *s; - /** + /** * Data to transmit. */ uint16_t data; @@ -122,7 +122,7 @@ tcp_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** * Try to send 'data' to the * IP 'dst_ipv4' at port 'dport' via TCP. - * + * * @param dst_ivp4 target IP * @param dport target port * @param data data to send @@ -169,7 +169,7 @@ try_send_tcp (uint32_t dst_ipv4, uint16_t dport, uint16_t data) /** * Try to send 'data' to the * IP 'dst_ipv4' at port 'dport' via UDP. - * + * * @param dst_ivp4 target IP * @param dport target port * @param data data to send @@ -208,7 +208,7 @@ try_send_udp (uint32_t dst_ipv4, uint16_t dport, uint16_t data) /** * We've received a request to probe a NAT * traversal. Do it. - * + * * @param cls unused * @param client handle to client (we always close) * @param msg message with details about what to test diff --git a/src/nat/nat.c b/src/nat/nat.c index a037e3b20b..891613fead 100644 --- a/src/nat/nat.c +++ b/src/nat/nat.c @@ -57,7 +57,7 @@ /** * Where did the given local address originate from? - * To be used for debugging as well as in the future + * To be used for debugging as well as in the future * to remove all addresses from a certain source when * we reevaluate the source. */ @@ -368,7 +368,7 @@ start_gnunet_nat_server (struct GNUNET_NAT_Handle *h); /** * Remove all addresses from the list of 'local' addresses * that originated from the given source. - * + * * @param plugin the plugin * @param src source that identifies addresses to remove */ @@ -396,8 +396,8 @@ remove_from_address_list_by_source (struct GNUNET_NAT_Handle *h, /** * Add the given address to the list of 'local' addresses, thereby - * making it a 'legal' address for this peer to have. - * + * making it a 'legal' address for this peer to have. + * * @param plugin the plugin * @param src where did the local address originate from? * @param arg the address, some 'struct sockaddr' @@ -431,7 +431,7 @@ add_to_address_list_as_is (struct GNUNET_NAT_Handle *h, * making it a 'legal' address for this peer to have. Set the * port number in the process to the advertised port and possibly * also to zero (if we have the gnunet-helper-nat-server). - * + * * @param plugin the plugin * @param src where did the local address originate from? * @param arg the address, some 'struct sockaddr' @@ -481,8 +481,8 @@ add_to_address_list (struct GNUNET_NAT_Handle *h, enum LocalAddressSource src, /** * Add the given IP address to the list of 'local' addresses, thereby - * making it a 'legal' address for this peer to have. - * + * making it a 'legal' address for this peer to have. + * * @param plugin the plugin * @param src where did the local address originate from? * @param arg the address, some 'struct in_addr' or 'struct in6_addr' @@ -1040,7 +1040,7 @@ add_from_bind (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) * @param address_callback function to call everytime the public IP address changes * @param reversal_callback function to call if someone wants connection reversal from us * @param callback_cls closure for callbacks - * @return NULL on error, otherwise handle that can be used to unregister + * @return NULL on error, otherwise handle that can be used to unregister */ struct GNUNET_NAT_Handle * GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp, diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c index 1f5a83d2d8..52a4e86b0c 100644 --- a/src/nat/nat_mini.c +++ b/src/nat/nat_mini.c @@ -361,12 +361,12 @@ process_refresh_output (void *cls, const char *line) } /* * we're looking for output of the form: - * + * * "0 TCP 3000->192.168.2.150:3000 'libminiupnpc' ''" * "1 UDP 3001->192.168.2.150:3001 'libminiupnpc' ''" - * + * * the pattern we look for is: - * + * * "%s TCP PORT->STRING:OURPORT *" or * "%s UDP PORT->STRING:OURPORT *" */ @@ -439,7 +439,7 @@ process_map_output (void *cls, const char *line) } /* * The upnpc output we're after looks like this: - * + * * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000" */ if ((NULL == (ipaddr = strstr (line, " "))) || @@ -475,7 +475,7 @@ process_map_output (void *cls, const char *line) * general-purpose 'GNUNET_NAT_register' code). However, it can be * used if specifically UPnP-based NAT traversal is to be used or * tested. - * + * * @param port port to map * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP * @param ac function to call with mapping result @@ -539,7 +539,7 @@ process_unmap_output (void *cls, const char *line) * this function will give 'upnpc' 1s to remove tha mapping, * so while this function is non-blocking, a task will be * left with the scheduler for up to 1s past this call. - * + * * @param mini the handle */ void diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c index 6a533798e0..784fc6cc74 100644 --- a/src/nat/test_nat.c +++ b/src/nat/test_nat.c @@ -45,7 +45,7 @@ /** - * Time to wait before stopping NAT, in seconds + * Time to wait before stopping NAT, in seconds */ #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) @@ -87,7 +87,7 @@ struct addr_cls /** * Return the address of the default interface, - * or any interface with a valid address if the default is not valid + * or any interface with a valid address if the default is not valid * * @param cls the 'struct addr_cls' * @param name name of the interface diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c index 4aac3d17f0..2c6da3b574 100644 --- a/src/nat/test_nat_mini.c +++ b/src/nat/test_nat_mini.c @@ -22,7 +22,7 @@ * Testcase for port redirection and public IP address retrieval. * This test never fails, because there need to be a NAT box set up for tha * * @file nat/test_nat_mini.c - * @brief Testcase for NAT library - mini + * @brief Testcase for NAT library - mini * @author Christian Grothoff * * TODO: actually use ARM to start resolver service to make DNS work! diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index b1e6235f9b..b8db301aa1 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c @@ -35,7 +35,7 @@ /** - * Time to wait before stopping NAT test, in seconds + * Time to wait before stopping NAT test, in seconds */ #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index c82180dfdd..f8d5f76f1b 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c @@ -1,17 +1,17 @@ /* This file is part of GNUnet. (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors) - + GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. - + GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -207,7 +207,7 @@ static struct GNUNET_CONTAINER_MultiHashMap *peers; /** * The current network size estimate. Number of bits matching on - * average thus far. + * average thus far. */ static double current_size_estimate; @@ -396,7 +396,7 @@ get_matching_bits_delay (uint32_t matching_bits) * What delay randomization should we apply for a given number of matching bits? * * @param matching_bits number of matching bits - * @return random delay to apply + * @return random delay to apply */ static struct GNUNET_TIME_Relative get_delay_randomization (uint32_t matching_bits) @@ -439,7 +439,7 @@ get_matching_bits (struct GNUNET_TIME_Absolute timestamp, /** - * Get the transmission delay that should be applied for a + * Get the transmission delay that should be applied for a * particular round. * * @param round_offset -1 for the previous round (random delay between 0 and 50ms) @@ -902,7 +902,7 @@ update_flood_times (void *cls, const GNUNET_HashCode * key, void *value) return GNUNET_OK; /* trigger of the update */ if (peer_entry->previous_round == GNUNET_NO) { - /* still stuck in previous round, no point to update, check that + /* still stuck in previous round, no point to update, check that * we are active here though... */ GNUNET_break ((peer_entry->transmit_task != GNUNET_SCHEDULER_NO_TASK) || (peer_entry->th != NULL)); diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index 26fec52899..e453621d28 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c @@ -158,7 +158,7 @@ get_host_filename (const struct GNUNET_PeerIdentity *id) /** - * Broadcast information about the given entry to all + * Broadcast information about the given entry to all * clients that care. * * @param entry entry to broadcast about diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index d1af01405d..3453758196 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c @@ -33,7 +33,7 @@ /** * Function to call after transmission has succeeded. - * + * * @param cls closure * @param success GNUNET_OK if transmission worked, GNUNET_SYSERR on error */ @@ -330,7 +330,7 @@ trigger_transmit (struct GNUNET_PEERINFO_Handle *h) /** - * Add a host to the persistent list. This method operates in + * Add a host to the persistent list. This method operates in * semi-reliable mode: if the transmission is not completed by * the time 'GNUNET_PEERINFO_disconnect' is called, it will be * aborted. Furthermore, if a second HELLO is added for the @@ -535,7 +535,7 @@ iterator_start_receive (void *cls, int transmit_success) /** - * Peerinfo iteration request has timed out. + * Peerinfo iteration request has timed out. * * @param cls the 'struct GNUNET_PEERINFO_IteratorContext*' * @param tc scheduler context @@ -567,7 +567,7 @@ signal_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) * * Instead of calling this function with 'peer == NULL' it is often * better to use 'GNUNET_PEERINFO_notify'. - * + * * @param h handle to the peerinfo service * @param peer restrict iteration to this peer only (can be NULL) * @param timeout how long to wait until timing out diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index 3305dc6f4c..24ed08833e 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c @@ -22,7 +22,7 @@ * @file statistics/gnunet-service-statistics.c * @brief program that tracks statistics * @author Christian Grothoff - * + * * TODO: * - use BIO for IO operations */ diff --git a/src/statistics/statistics.h b/src/statistics/statistics.h index 7575509226..14dd45d82f 100644 --- a/src/statistics/statistics.h +++ b/src/statistics/statistics.h @@ -110,9 +110,9 @@ struct GNUNET_STATISTICS_WatchValueMessage /** * Unique watch identification number (watch - * requests are enumerated in the order they - * are received, the first request having - * a wid of zero). + * requests are enumerated in the order they + * are received, the first request having + * a wid of zero). */ uint32_t wid GNUNET_PACKED; diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index e117e971c0..10659f11af 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -36,7 +36,7 @@ /** * How long do we wait until a statistics request for setting * a value times out? (The update will be lost if the - * service does not react within this timeframe). + * service does not react within this timeframe). */ #define SET_TRANSMIT_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) @@ -954,7 +954,7 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, /** - * Cancel a 'get' request. Must be called before the 'cont' + * Cancel a 'get' request. Must be called before the 'cont' * function is called. * * @param gh handle of the request to cancel diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 4db7ce6d29..55ee36fd2f 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c @@ -231,7 +231,7 @@ static int autoconnect; /** - * Function that decides if a connection is acceptable or not. + * Function that decides if a connection is acceptable or not. * If we have a blacklist, only friends are allowed, so the check * is rather simple. * @@ -285,7 +285,7 @@ connect_completed_callback (void *cls, int success) /** * Check if an additional connection from the given peer is allowed. - * + * * @param peer connection to check * @return GNUNET_OK if the connection is allowed */ @@ -536,7 +536,7 @@ struct FindAdvHelloContext * * @param cls closure * @param pid identity of a peer - * @param value 'struct Peer*' for the peer we are considering + * @param value 'struct Peer*' for the peer we are considering * @return GNUNET_YES (continue iteration) */ static int diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c index 54af9cadec..b605954ac0 100644 --- a/src/transport/gnunet-service-transport-new.c +++ b/src/transport/gnunet-service-transport-new.c @@ -20,7 +20,7 @@ /** * @file transport/gnunet-service-transport-new.c - * @brief + * @brief * @author Christian Grothoff */ #include "platform.h" @@ -156,8 +156,7 @@ static struct GNUNET_TIME_Relative plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message, const struct GNUNET_TRANSPORT_ATS_Information *ats, - uint32_t ats_count, - struct Session *session, + uint32_t ats_count, struct Session *session, const char *sender_address, uint16_t sender_address_len) { @@ -202,7 +201,7 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed, NULL); - /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred + /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred * way to communicate with this peer (other peer switched transport) */ break; case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: @@ -224,21 +223,20 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, &do_forward); if (do_forward == GNUNET_YES) { - struct InboundMessage * im; - size_t size = - sizeof (struct InboundMessage) + - ntohs (message->size); + struct InboundMessage *im; + size_t size = sizeof (struct InboundMessage) + ntohs (message->size); im = GNUNET_malloc (size); im->header.size = htons (size); im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV); im->ats_count = htonl (0); - memcpy (&(im->peer), peer, sizeof(struct GNUNET_PeerIdentity)); + memcpy (&(im->peer), peer, sizeof (struct GNUNET_PeerIdentity)); memcpy (&im[1], message, ntohs (message->size)); - GST_clients_broadcast ((const struct GNUNET_MessageHeader *) im, GNUNET_YES); + GST_clients_broadcast ((const struct GNUNET_MessageHeader *) im, + GNUNET_YES); - GNUNET_free(im); + GNUNET_free (im); } break; } @@ -280,9 +278,9 @@ plugin_env_address_change_notification (void *cls, int add_remove, * use NULL wherever a session pointer is needed. This function * should be called BEFORE a potential "TransmitContinuation" * from the "TransmitFunction". - * + * * @param cls closure - * @param peer which peer was the session for + * @param peer which peer was the session for * @param session which session is being destoyed */ static void @@ -297,7 +295,7 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer, * Function called by ATS to notify the callee that the * assigned bandwidth or address for a given peer was changed. If the * callback is called with address/bandwidth assignments of zero, the - * ATS disconnect function will still be called once the disconnect + * ATS disconnect function will still be called once the disconnect * actually happened. * * @param cls closure diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index d6b5ac23f2..67dc4e9622 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -439,7 +439,7 @@ struct ReadyList /** - * Entry in neighbours. + * Entry in neighbours. */ struct NeighbourMapEntry { @@ -2270,12 +2270,12 @@ try_fast_reconnect (struct TransportPlugin *p, struct NeighbourMapEntry *nl) * quickly (much faster than timeout) `if a connection was lost and * could not be re-established (i.e. other peer went down or is * unable / refuses to communicate); - * + * * So we should consider: * 1) ideally: our own willingness / need to connect * 2) prior failures to connect to this peer (by plugin) * 3) ideally: reasons why other peer terminated (as far as knowable) - * + * * Most importantly, it must be POSSIBLE for another peer to terminate * a connection for a while (without us instantly re-establishing it). * Similarly, if another peer is gone we should quickly notify CORE. @@ -2284,7 +2284,7 @@ try_fast_reconnect (struct TransportPlugin *p, struct NeighbourMapEntry *nl) * services never even notice. * Furthermore, the same mechanism (or small variation) could be used * to switch to a better-performing plugin (ATS). - * + * * Finally, this needs to be tested throughly... */ /* @@ -4002,7 +4002,7 @@ check_pending_validation (void *cls, const GNUNET_HashCode * key, void *value) GNUNET_i2s (&pong->pid), a2s (ve->transport_name, &addr[slen], alen)); /* FIXME: since the sender of the PONG currently uses the - * wrong address (see FIMXE there!), we cannot run a + * wrong address (see FIMXE there!), we cannot run a * proper check here... */ #if FIXME_URGENT return GNUNET_NO; diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index 21ad49652b..36abbf85cd 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c @@ -648,7 +648,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, bl->waiting_for_reply = GNUNET_NO; if (NULL != bc) { - /* only run this if the blacklist check has not been + /* only run this if the blacklist check has not been * cancelled in the meantime... */ if (ntohl (msg->is_allowed) == GNUNET_SYSERR) { @@ -683,7 +683,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, /** * Add the given peer to the blacklist (for the given transport). - * + * * @param peer peer to blacklist * @param transport_name transport to blacklist for this peer, NULL for all */ @@ -780,7 +780,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, /** * Cancel a blacklist check. - * + * * @param bc check to cancel */ void diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h index 64a8006641..68da7e4ce4 100644 --- a/src/transport/gnunet-service-transport_blacklist.h +++ b/src/transport/gnunet-service-transport_blacklist.h @@ -71,7 +71,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client, /** * Add the given peer to the blacklist (for the given transport). - * + * * @param peer peer to blacklist * @param transport_name transport to blacklist for this peer, NULL for all */ @@ -117,7 +117,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer, /** * Cancel a blacklist check. - * + * * @param bc check to cancel */ void diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 73d1220e43..6a29edc347 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c @@ -377,8 +377,7 @@ clients_handle_start (void *cls, struct GNUNET_SERVER_Client *client, #if DEBUG_TRANSPORT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, "TransportClient %X ServerClient %X sent multiple START messages\n", - tc, - tc->client); + tc, tc->client); #endif GNUNET_break (0); GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 3c51c5df22..2793ce5eb0 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c @@ -128,7 +128,7 @@ struct GeneratorContext /** * Add an address from the 'OwnAddressList' to the buffer. - * + * * @param cls the 'struct GeneratorContext' * @param max maximum number of bytes left * @param buf where to write the address diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 76e27bf2e3..d971e7cf9e 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -47,7 +47,7 @@ /** - * Entry in neighbours. + * Entry in neighbours. */ struct NeighbourMapEntry; @@ -105,7 +105,7 @@ struct MessageQueue /** - * Entry in neighbours. + * Entry in neighbours. */ struct NeighbourMapEntry { @@ -171,7 +171,7 @@ struct NeighbourMapEntry /** * ID of task scheduled to run when we should try transmitting - * the head of the message queue. + * the head of the message queue. */ GNUNET_SCHEDULER_TaskIdentifier transmission_task; @@ -622,7 +622,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target) /** * Test if we're connected to the given peer. - * + * * @param target peer to test * @return GNUNET_YES if we are connected, GNUNET_NO if not */ @@ -839,7 +839,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour) * Change the incoming quota for the given peer. * * @param neighbour identity of peer to change qutoa for - * @param quota new quota + * @param quota new quota */ void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, @@ -912,7 +912,7 @@ neighbours_iterate (void *cls, const GNUNET_HashCode * key, void *value) /** * Iterate over all connected neighbours. * - * @param cb function to call + * @param cb function to call * @param cb_cls closure for cb */ void diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index db29d66aa4..d7b234889d 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h @@ -66,7 +66,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target); /** * Test if we're connected to the given peer. - * + * * @param target peer to test * @return GNUNET_YES if we are connected, GNUNET_NO if not */ @@ -129,7 +129,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); * Change the incoming quota for the given peer. * * @param neighbour identity of peer to change qutoa for - * @param quota new quota + * @param quota new quota */ void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, @@ -164,7 +164,7 @@ typedef void (*GST_NeighbourIterator) (void *cls, /** * Iterate over all connected neighbours. * - * @param cb function to call + * @param cb function to call * @param cb_cls closure for cb */ void diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c index c32ac3acc4..12ee231c4a 100644 --- a/src/transport/gnunet-service-transport_plugins.c +++ b/src/transport/gnunet-service-transport_plugins.c @@ -189,7 +189,7 @@ GST_plugins_find (const char *name) /** * Convert a given address to a human-readable format. Note that the * return value will be overwritten on the next call to this function. - * + * * @param name plugin name * @param addr binary address in plugin-specific format * @param addrlen number of bytes in 'addr' diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h index 856b594cd9..3a49f004fe 100644 --- a/src/transport/gnunet-service-transport_plugins.h +++ b/src/transport/gnunet-service-transport_plugins.h @@ -68,7 +68,7 @@ GST_plugins_find (const char *name); /** * Convert a given address to a human-readable format. Note that the * return value will be overwritten on the next call to this function. - * + * * @param name plugin name * @param addr binary address in plugin-specific format * @param addrlen number of bytes in 'addr' diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index c6ee515fe6..8b652ceaa2 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c @@ -409,7 +409,7 @@ add_valid_address (void *cls, const char *tname, /** - * Function called for any HELLO known to PEERINFO. + * Function called for any HELLO known to PEERINFO. * * @param cls unused * @param peer id of the peer, NULL for last call @@ -737,7 +737,8 @@ transmit_ping_if_allowed (void *cls, const struct GNUNET_PeerIdentity *pid, hsize = ntohs (hello->size); tsize = sizeof (struct TransportPingMessage) + ve->addrlen + slen + hsize; - ping.header.size = htons (sizeof (struct TransportPingMessage) + ve->addrlen + slen); + ping.header.size = + htons (sizeof (struct TransportPingMessage) + ve->addrlen + slen); ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING); ping.challenge = htonl (ve->challenge); ping.target = *pid; diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index 3fca1f85f4..ad68102339 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c @@ -611,7 +611,7 @@ stdin_send_hw (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) rtheader.rate = header->rate; memcpy (write_pout->buf, &rtheader, sizeof (rtheader)); memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize); - /* payload contains MAC address, but we don't trust it, so we'll + /* payload contains MAC address, but we don't trust it, so we'll * overwrite it with OUR MAC address again to prevent mischief */ wlanheader = (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader)); mac_set (wlanheader, dev); diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index d6084d9f00..452f55e1a8 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -385,7 +385,7 @@ struct Plugin /** * Function to check if an inbound connection is acceptable. - * Mostly used to limit the total number of open connections + * Mostly used to limit the total number of open connections * we can have. * * @param cls the 'struct Plugin' diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 07a3df3620..92fa8d2f56 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -170,7 +170,7 @@ struct PeerSession /** * Data structure to track defragmentation contexts based - * on the source of the UDP traffic. + * on the source of the UDP traffic. */ struct ReceiveContext { @@ -272,7 +272,7 @@ struct Plugin struct GNUNET_NETWORK_Handle *sockv6; /** - * expected delay for ACKs + * expected delay for ACKs */ struct GNUNET_TIME_Relative last_expected_delay; @@ -557,7 +557,7 @@ struct SourceInformation /** - * Message tokenizer has broken up an incomming message. Pass it on + * Message tokenizer has broken up an incomming message. Pass it on * to the service. * * @param cls the 'struct Plugin' @@ -588,7 +588,7 @@ process_inbound_tokenized_messages (void *cls, void *client, * * @param plugin plugin context * @param msg the message - * @param sender_addr sender address + * @param sender_addr sender address * @param sender_addr_len number of bytes in sender_addr */ static void diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 3037091365..29b4658458 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -109,8 +109,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (send_task != GNUNET_SCHEDULER_NO_TASK) GNUNET_SCHEDULER_cancel (send_task); - if (cc != NULL) - GNUNET_TRANSPORT_TESTING_connect_peers_cancel(cc); + if (cc != NULL) + GNUNET_TRANSPORT_TESTING_connect_peers_cancel (cc); if (th != NULL) GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); @@ -229,7 +229,8 @@ run (void *cls, char *const *args, const char *cfgfile, p2 = GNUNET_TRANSPORT_TESTING_start_peer (cfg_file_p2, ¬ify_receive, ¬ify_connect, ¬ify_disconnect, NULL); - cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb, NULL); + cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb, + NULL); } static int diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c index 35c9e546b4..075c105273 100644 --- a/src/transport/test_transport_startonly.c +++ b/src/transport/test_transport_startonly.c @@ -119,11 +119,10 @@ static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - timeout_task = - GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); + timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); i = 1; - fprintf(stderr,"%i",i); + fprintf (stderr, "%i", i); while (i <= ITERATIONS) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n"); @@ -142,14 +141,14 @@ run (void *cls, char *const *args, const char *cfgfile, //sleep (5); - GNUNET_TRANSPORT_TESTING_stop_peer(p1); + GNUNET_TRANSPORT_TESTING_stop_peer (p1); i++; if (i <= ITERATIONS) - fprintf(stderr,"..%i",i); + fprintf (stderr, "..%i", i); } - fprintf(stderr,"\n"); - end(); + fprintf (stderr, "\n"); + end (); } int diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index 61c392d77c..162024eb46 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c @@ -321,10 +321,11 @@ GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1, * Tou MUST cancel the request if you stop the peers before the peers connected succesfully * @param cc a connect request handle */ -void -GNUNET_TRANSPORT_TESTING_connect_peers_cancel (GNUNET_TRANSPORT_TESTING_ConnectRequest ccr) +void GNUNET_TRANSPORT_TESTING_connect_peers_cancel + (GNUNET_TRANSPORT_TESTING_ConnectRequest ccr) { struct ConnectingContext *cc = ccr; + /* clean up */ GNUNET_TRANSPORT_get_hello_cancel (cc->th_p2, &exchange_hello_last, cc); GNUNET_TRANSPORT_get_hello_cancel (cc->th_p1, &exchange_hello, cc); diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index fed611e490..a6d2fa0ba6 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c @@ -86,7 +86,7 @@ struct GNUNET_TRANSPORT_TransmitHandle struct GNUNET_TIME_Absolute timeout; /** - * Task to trigger request timeout if the request is stalled due to + * Task to trigger request timeout if the request is stalled due to * congestion. */ GNUNET_SCHEDULER_TaskIdentifier timeout_task; @@ -520,7 +520,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->th->timeout_task); GNUNET_SCHEDULER_cancel (n->th->timeout_task); n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK; - /* we've been waiting for this (congestion, not quota, + /* we've been waiting for this (congestion, not quota, * caused delayed transmission) */ n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0); schedule_transmission (h); @@ -1082,7 +1082,7 @@ send_try_connect (void *cls, size_t size, void *buf) /** - * Ask the transport service to establish a connection to + * Ask the transport service to establish a connection to * the given peer. * * @param handle connection to transport service diff --git a/src/transport/wlan/byteorder.h b/src/transport/wlan/byteorder.h index 1abc631b8d..1a13470e95 100644 --- a/src/transport/wlan/byteorder.h +++ b/src/transport/wlan/byteorder.h @@ -54,12 +54,12 @@ #ifndef __int8_t_defined typedef uint64_t u_int64_t; -
typedef uint32_t u_int32_t; -
typedef uint16_t u_int16_t; -
typedef uint8_t u_int8_t; +typedef uint32_t u_int32_t; +typedef uint16_t u_int16_t; +typedef uint8_t u_int8_t; -#endif /*
*/ +#endif /* */ #ifndef htole16 #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -77,7 +77,7 @@ typedef uint64_t u_int64_t; #define htole64(x) (x) #define be64toh(x) ___my_swab64 (x) #define le64toh(x) (x) -#else /*
*/ +#else /* */ #define htobe16(x) (x) #define htole16(x) ___my_swab16 (x) #define be16toh(x) (x) @@ -92,10 +92,10 @@ typedef uint64_t u_int64_t; #define htole64(x) ___my_swab64 (x) #define be64toh(x) (x) #define le64toh(x) ___my_swab64 (x) -#endif /*
*/ -#endif /*
*/ +#endif /* */ +#endif /* */ -#endif /*
*/ +#endif /* */ /* * Cygwin */ @@ -115,7 +115,7 @@ typedef uint64_t u_int64_t; #define __cpu_to_le32(x) (x) #define __cpu_to_le16(x) (x) #define AIRCRACK_NG_BYTE_ORDER_DEFINED -#endif /*
*/ +#endif /* */ /* * Windows (DDK) */ @@ -134,7 +134,7 @@ typedef uint64_t u_int64_t; #define __cpu_to_le32(x) (x) #define __cpu_to_le16(x) (x) #define AIRCRACK_NG_BYTE_ORDER_DEFINED -#endif /*
*/ +#endif /* */ /* * MAC (Darwin) */ @@ -156,7 +156,7 @@ typedef uint64_t u_int64_t; #define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x) #define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x) #define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x) -#else /*
*/ +#else /* */ #include <architecture/byte_order.h> #define __swab64(x) NXSwapLongLong(x) #define __swab32(x) NXSwapLong(x) @@ -173,13 +173,13 @@ typedef uint64_t u_int64_t; #define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x) #define __cpu_to_le32(x) NXSwapHostLongToLittle(x) #define __cpu_to_le16(x) NXSwapHostShortToLittle(x) -#endif /*
*/ +#endif /* */ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 #define __BYTE_ORDER __BIG_ENDIAN #define AIRCRACK_NG_BYTE_ORDER_DEFINED -#endif /*
*/ +#endif /* */ /* * Solaris * ------- @@ -200,14 +200,14 @@ typedef uint64_t u_int64_t; #define __cpu_to_le64(x) ___my_swab64(x) #define __cpu_to_le32(x) ___my_swab32(x) #define __cpu_to_le16(x) ___my_swab16(x) -
typedef uint64_t u_int64_t; -
typedef uint32_t u_int32_t; -
typedef uint16_t u_int16_t; -
typedef uint8_t u_int8_t; +typedef uint64_t u_int64_t; +typedef uint32_t u_int32_t; +typedef uint16_t u_int16_t; +typedef uint8_t u_int8_t; #define AIRCRACK_NG_BYTE_ORDER_DEFINED -#endif /*
*/ +#endif /* */ /* * Custom stuff */ @@ -216,12 +216,12 @@ typedef uint64_t u_int64_t; #define __cpu_to_be64(x) = OSSwapHostToBigInt64(x) #define __cpu_to_be32(x) = OSSwapHostToBigInt32(x) #define AIRCRACK_NG_BYTE_ORDER_DEFINED -#endif /*
*/ +#endif /* */ // FreeBSD #ifdef __FreeBSD__ #include <machine/endian.h> -#endif /*
*/ +#endif /* */ // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...? // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h @@ -233,39 +233,39 @@ typedef uint64_t u_int64_t; #define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN #elif defined(_LITTLE_ENDIAN) #define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN -#endif /*
*/ +#endif /* */ #if defined(BIG_ENDIAN) #define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN #elif defined(__BIG_ENDIAN) #define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN #elif defined(_BIG_ENDIAN) #define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN -#endif /*
*/ +#endif /* */ #if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN) #error Impossible to determine endianness (Little or Big endian), please contact the author. -#endif /*
*/ +#endif /* */ #if defined(BYTE_ORDER) #if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN #elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN -#endif /*
*/ +#endif /* */ #elif defined(__BYTE_ORDER) #if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN #elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN -#endif /*
*/ +#endif /* */ #elif defined(_BYTE_ORDER) #if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN #elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN -#endif /*
*/ -#endif /*
*/ +#endif /* */ +#endif /* */ #ifndef AIRCRACK_NG_BYTE_ORDER #error Impossible to determine endianness (Little or Big endian), please contact the author. -#endif /*
*/ +#endif /* */ #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED #define __be64_to_cpu(x) ___my_swab64(x) @@ -280,32 +280,32 @@ typedef uint64_t u_int64_t; #define __cpu_to_le64(x) (x) #define __cpu_to_le32(x) (x) #define __cpu_to_le16(x) (x) -#endif /*
*/ +#endif /* */ #ifndef htobe16 #define htobe16 ___my_swab16 -#endif /*
*/ +#endif /* */ #ifndef htobe32 #define htobe32 ___my_swab32 -#endif /*
*/ +#endif /* */ #ifndef betoh16 #define betoh16 ___my_swab16 -#endif /*
*/ +#endif /* */ #ifndef betoh32 #define betoh32 ___my_swab32 -#endif /*
*/ +#endif /* */ #ifndef htole16 #define htole16(x) (x) -#endif /*
*/ +#endif /* */ #ifndef htole32 #define htole32(x) (x) -#endif /*
*/ +#endif /* */ #ifndef letoh16 #define letoh16(x) (x) -#endif /*
*/ +#endif /* */ #ifndef letoh32 #define letoh32(x) (x) -#endif /*
*/ -#endif /*
*/ +#endif /* */ +#endif /* */ #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED #define __be64_to_cpu(x) (x) @@ -320,32 +320,32 @@ typedef uint64_t u_int64_t; #define __cpu_to_le64(x) ___my_swab64(x) #define __cpu_to_le32(x) ___my_swab32(x) #define __cpu_to_le16(x) ___my_swab16(x) -#endif /*
*/ +#endif /* */ #ifndef htobe16 #define htobe16(x) (x) -#endif /*
*/ +#endif /* */ #ifndef htobe32 #define htobe32(x) (x) -#endif /*
*/ +#endif /* */ #ifndef betoh16 #define betoh16(x) (x) -#endif /*
*/ +#endif /* */ #ifndef betoh32 #define betoh32(x) (x) -#endif /*
*/ +#endif /* */ #ifndef htole16 #define htole16 ___my_swab16 -#endif /*
*/ +#endif /* */ #ifndef htole32 #define htole32 ___my_swab32 -#endif /*
*/ +#endif /* */ #ifndef letoh16 #define letoh16 ___my_swab16 -#endif /*
*/ +#endif /* */ #ifndef letoh32 #define letoh32 ___my_swab32 -#endif /*
*/ -#endif /*
*/ +#endif /* */ +#endif /* */ // Common defines #define cpu_to_le64 __cpu_to_le64 #define le64_to_cpu __le64_to_cpu @@ -361,27 +361,27 @@ typedef uint64_t u_int64_t; #define be16_to_cpu __be16_to_cpu #ifndef le16toh #define le16toh le16_to_cpu -#endif /*
*/ +#endif /* */ #ifndef be16toh #define be16toh be16_to_cpu -#endif /*
*/ +#endif /* */ #ifndef le32toh #define le32toh le32_to_cpu -#endif /*
*/ +#endif /* */ #ifndef be32toh #define be32toh be32_to_cpu -#endif /*
*/ +#endif /* */ #ifndef htons #define htons be16_to_cpu -#endif /*
*/ +#endif /* */ #ifndef htonl #define htonl cpu_to_be16 -#endif /*
*/ +#endif /* */ #ifndef ntohs #define ntohs cpu_to_be16 -#endif /*
*/ +#endif /* */ #ifndef ntohl #define ntohl cpu_to_be32 -#endif /*
*/ -#endif /*
*/ +#endif /* */ +#endif /* */ diff --git a/src/transport/wlan/ieee80211.h b/src/transport/wlan/ieee80211.h index a952674ca3..fd297f4a4a 100644 --- a/src/transport/wlan/ieee80211.h +++ b/src/transport/wlan/ieee80211.h @@ -646,7 +646,7 @@ enum #define IEEE80211_AID(b) ((b) &~ 0xc000) -/* +/* * RTS frame length parameters. The default is specified in * the 802.11 spec as 512; we treat it as implementation-dependent * so it's defined in ieee80211_var.h. The max may be wrong @@ -655,7 +655,7 @@ enum #define IEEE80211_RTS_MIN 1 #define IEEE80211_RTS_MAX 2346 -/* +/* * TX fragmentation parameters. As above for RTS, we treat * default as implementation-dependent so define it elsewhere. */ diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c index 95ff4bfffa..8d81e55a08 100644 --- a/src/util/bandwidth.c +++ b/src/util/bandwidth.c @@ -20,7 +20,7 @@ /** * @file util/bandwidth.c - * @brief functions related to bandwidth (unit) + * @brief functions related to bandwidth (unit) * @author Christian Grothoff */ #include "platform.h" diff --git a/src/util/client.c b/src/util/client.c index 2b866e6f8a..4e6093a683 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -103,7 +103,7 @@ struct GNUNET_CLIENT_TransmitHandle /** - * Context for processing + * Context for processing * "GNUNET_CLIENT_transmit_and_get_response" requests. */ struct TransmitGetResponseContext @@ -692,7 +692,7 @@ write_test (void *cls, size_t size, void *buf) * * @param service name of the service to wait for * @param cfg configuration to use - * @param timeout how long to wait at most + * @param timeout how long to wait at most * @param task task to run if service is running * (reason will be "PREREQ_DONE" (service running) * or "TIMEOUT" (service not known to be running)) @@ -1108,7 +1108,7 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock, /** * Cancel a request for notification. - * + * * @param th handle from the original request. */ void @@ -1188,7 +1188,7 @@ transmit_for_response (void *cls, size_t size, void *buf) * if the caller does not care about temporary connection errors, * for example because the protocol is stateless * @param rn function to call with the response - * @param rn_cls closure for rn + * @param rn_cls closure for rn * @return GNUNET_OK on success, GNUNET_SYSERR if a request * is already pending */ diff --git a/src/util/configuration.c b/src/util/configuration.c index 534949652a..c69042175b 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -495,7 +495,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, * @param cls the destination configuration (struct GNUNET_CONFIGURATION_Handle*) * @param section section for the value * @param option option name of the value - * @param value value to copy + * @param value value to copy */ static void copy_entry (void *cls, const char *section, const char *option, diff --git a/src/util/connection.c b/src/util/connection.c index 9aeca90967..8639d24161 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -111,7 +111,7 @@ struct GNUNET_CONNECTION_TransmitHandle /** * During connect, we try multiple possible IP addresses - * to find out which one might work. + * to find out which one might work. */ struct AddressProbe { @@ -165,13 +165,13 @@ struct GNUNET_CONNECTION_Handle const struct GNUNET_CONFIGURATION_Handle *cfg; /** - * Linked list of sockets we are currently trying out + * Linked list of sockets we are currently trying out * (during connect). */ struct AddressProbe *ap_head; /** - * Linked list of sockets we are currently trying out + * Linked list of sockets we are currently trying out * (during connect). */ struct AddressProbe *ap_tail; @@ -1047,7 +1047,7 @@ GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock) /** * Close the socket and free associated resources. Pending * transmissions may be completed or dropped depending on the - * arguments. If a receive call is pending and should + * arguments. If a receive call is pending and should * NOT be completed, 'GNUNET_CONNECTION_receive_cancel' * should be called explicitly first. * diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 059a5b253e..cd4d7909aa 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c @@ -1,17 +1,17 @@ /* This file is part of GNUnet. (C) 2008, 2009 Christian Grothoff (and other contributing authors) - + GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -481,7 +481,7 @@ remove_node (struct GNUNET_CONTAINER_HeapNode *node) /** * Removes a node from the heap. - * + * * @param node node to remove * @return element data stored at the node */ diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index eb515e8fb5..16173cca95 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c @@ -105,7 +105,7 @@ struct GNUNET_CONTAINER_MetaData /** * Create a fresh struct CONTAINER_MetaData token. - * + * * @return empty meta-data container */ struct GNUNET_CONTAINER_MetaData * @@ -251,7 +251,7 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found @@ -339,7 +339,7 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md, * used in the main libextractor library and yielding * meta data). * @param type libextractor-type describing the meta data - * @param format basic format information about data + * @param format basic format information about data * @param data_mime_type mime-type of data (not of the original file); * can be NULL (if mime-type is not known) * @param data actual meta-data found @@ -587,7 +587,7 @@ GNUNET_CONTAINER_meta_data_get_thumbnail (const struct GNUNET_CONTAINER_MetaData /** * Duplicate struct GNUNET_CONTAINER_MetaData. - * + * * @param md what to duplicate * @return duplicate meta-data container */ diff --git a/src/util/container_slist.c b/src/util/container_slist.c index 2d7c24c03a..1dd0344e41 100644 --- a/src/util/container_slist.c +++ b/src/util/container_slist.c @@ -55,7 +55,7 @@ struct GNUNET_CONTAINER_SList_Elem /** - * Handle to a singly linked list + * Handle to a singly linked list */ struct GNUNET_CONTAINER_SList { @@ -77,7 +77,7 @@ struct GNUNET_CONTAINER_SList /** - * Handle to a singly linked list iterator + * Handle to a singly linked list iterator */ struct GNUNET_CONTAINER_SList_Iterator { diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 6438784ba5..c253bbf2f4 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c @@ -340,7 +340,7 @@ GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result) * fast, not involve bits[0] or bits[4] (they're used elsewhere), and be * somewhat consistent. And of course, the result should be a positive * number. - * + * * @param a some hash code * @param b some hash code * @return a positive number which is a measure for diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c index cd665ad238..eff4e6fd65 100644 --- a/src/util/crypto_kdf.c +++ b/src/util/crypto_kdf.c @@ -53,7 +53,7 @@ GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts, * setting. Second, as shown in Section 6, using HMAC with a truncated output as an extractor * allows to prove the security of HKDF under considerably weaker assumptions on the underlying * hash function." - * + * * http://eprint.iacr.org/2010/264 */ diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index bb105437df..445f99a629 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c @@ -32,7 +32,7 @@ /** * Create a cryptographically weak pseudo-random number in the interval of 0 to 1. - * + * * @return number between 0 and 1. */ static double diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index ec46b486c0..46778a8428 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c @@ -547,7 +547,7 @@ GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len) * files does not exist, create a new key and write it to the * file. Caller must free return value. Note that this function * can not guarantee that another process might not be trying - * the same operation on the same file at the same time. + * the same operation on the same file at the same time. * If the contents of the file * are invalid the old file is deleted and a fresh key is * created. diff --git a/src/util/disk.c b/src/util/disk.c index 6ba5db7732..9059852d34 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -139,7 +139,7 @@ translate_unix_perms (enum GNUNET_DISK_AccessPermissions perm) /** - * Iterate over all files in the given directory and + * Iterate over all files in the given directory and * accumulate their size. * * @param cls closure of type "struct GetFileSizeData" @@ -339,7 +339,7 @@ GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev, * an absolute path, the current 'TMPDIR' will be prepended. In any case, * 6 random characters will be appended to the name to create a unique * filename. - * + * * @param t component to use for the name; * does NOT contain "XXXXXX" or "/tmp/". * @return NULL on error, otherwise name of fresh @@ -767,7 +767,7 @@ GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle * h, * @param fn file name * @param buffer the data to write * @param n number of bytes to write - * @param mode file permissions + * @param mode file permissions * @return number of bytes written on success, GNUNET_SYSERR on error */ ssize_t @@ -788,7 +788,7 @@ GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n, } /** - * Scan a directory for files. + * Scan a directory for files. * * @param dirName the name of the directory * @param callback the method to call for each file, diff --git a/src/util/getopt.c b/src/util/getopt.c index eb79db757b..d48183b2ad 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c @@ -609,16 +609,16 @@ GN_getopt_internal (int argc, char *const *argv, const char *optstring, /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. - * + * * If long_only and the ARGV-element has the form "-f", where f is * a valid short option, don't consider it an abbreviated form of * a long option that starts with f. Otherwise there would be no * way to give the -f short option. - * + * * On the other hand, if there's a long option "fubar" and * the ARGV-element is "-fu", do consider that an abbreviation of * the long option, just like "--fu", and not "-f" with arg "u". - * + * * This distinction seems to be the most useful approach. */ if (longopts != NULL && diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index d0c8c0e6a5..d050ec99c1 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c @@ -163,7 +163,7 @@ OUTER: * @param scls additional closure (will point to the 'int') * @param option name of the option * @param value not used (NULL) - * @return GNUNET_OK + * @return GNUNET_OK */ int GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext @@ -178,7 +178,7 @@ GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext /** - * Set an option of type 'int' from the command line to 1 if the + * Set an option of type 'int' from the command line to 1 if the * given option is present. * A pointer to this function should be passed as part of the * 'struct GNUNET_GETOPT_CommandLineOption' array to initialize options @@ -189,7 +189,7 @@ GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext * @param scls additional closure (will point to the 'int') * @param option name of the option * @param value not used (NULL) - * @return GNUNET_OK + * @return GNUNET_OK */ int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, @@ -214,7 +214,7 @@ GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * which will be allocated) * @param option name of the option * @param value actual value of the option (a string) - * @return GNUNET_OK + * @return GNUNET_OK */ int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, diff --git a/src/util/load.c b/src/util/load.c index c7ef07295e..35ed443c33 100644 --- a/src/util/load.c +++ b/src/util/load.c @@ -164,7 +164,7 @@ calculate_load (struct GNUNET_LOAD_Value *load) if (load->cummulative_request_count <= 1) return; /* calcuate std dev of latency; we have for n values of "i" that: - * + * * avg = (sum val_i) / n * stddev = (sum (val_i - avg)^2) / (n-1) * = (sum (val_i^2 - 2 avg val_i + avg^2) / (n-1) diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 00825f2b7a..1f4c5f0007 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -435,7 +435,7 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind) * PATH environment variable as a search path. * * @param binary the name of the file to check - * @return GNUNET_YES if the file is SUID, + * @return GNUNET_YES if the file is SUID, * GNUNET_NO if not SUID (but binary exists) * GNUNET_SYSERR on error (no such binary or not executable) */ diff --git a/src/util/peer.c b/src/util/peer.c index cd5444a19c..1491211c5e 100644 --- a/src/util/peer.c +++ b/src/util/peer.c @@ -157,7 +157,7 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid) /** * Decrement multiple RCs of peer identities by one. - * + * * @param ids array of PIDs to decrement the RCs of * @param count size of the ids array */ diff --git a/src/util/plugin.c b/src/util/plugin.c index 08b32b295c..dbd3519aaf 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c @@ -151,7 +151,7 @@ resolve_function (struct PluginList *plug, const char *name) * Test if a plugin exists. * * Note that the library must export a symbol called - * "library_name_init" for the test to succeed. + * "library_name_init" for the test to succeed. * * @param library_name name of the plugin to test if it is installed * @return GNUNET_YES if the plugin exists, GNUNET_NO if not diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index 85a4850986..85353c6da7 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c @@ -31,41 +31,41 @@ #include "gnunet_pseudonym_lib.h" #include "gnunet_bio_lib.h" -/** +/** * Name of the directory which stores meta data for pseudonym */ #define PS_METADATA_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "metadata" DIR_SEPARATOR_STR -/** +/** * Name of the directory which stores names for pseudonyms */ #define PS_NAMES_DIR DIR_SEPARATOR_STR "data" DIR_SEPARATOR_STR "pseudonyms" DIR_SEPARATOR_STR "names" DIR_SEPARATOR_STR -/** +/** * Registered callbacks for discovery of pseudonyms. */ struct DiscoveryCallback { - /** + /** * This is a linked list. */ struct DiscoveryCallback *next; - /** + /** * Function to call each time a pseudonym is discovered. */ GNUNET_PSEUDONYM_Iterator callback; - /** + /** * Closure for callback. */ void *closure; }; -/** - * Head of the linked list of functions to call when +/** + * Head of the linked list of functions to call when * new pseudonyms are added. */ static struct DiscoveryCallback *head; @@ -280,7 +280,7 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, /** * Return the unique, human readable name for the given namespace. * - * @param cfg configuration + * @param cfg configuration * @param nsid cryptographic ID of the namespace * @return NULL on failure (should never happen) */ @@ -489,7 +489,7 @@ list_pseudonym_helper (void *cls, const char *fullname) /** * List all available pseudonyms. * - * @param cfg overall configuration + * @param cfg overall configuration * @param iterator function to call for each pseudonym * @param closure closure for iterator * @return number of pseudonyms found diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 3607ce67f6..69c49d1e85 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c @@ -268,7 +268,7 @@ GNUNET_RESOLVER_disconnect () /** * Convert IP address to string without DNS resolution. * - * @param sa the address + * @param sa the address * @param salen number of bytes in sa * @return address as a string, NULL on error */ @@ -469,7 +469,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) /** - * We've been asked to lookup the address for a hostname and were + * We've been asked to lookup the address for a hostname and were * given a valid numeric string. Perform the callbacks for the * numeric addresses. * @@ -524,7 +524,7 @@ numeric_resolution (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * We've been asked to lookup the address for a hostname and were + * We've been asked to lookup the address for a hostname and were * given a variant of "loopback". Perform the callbacks for the * respective loopback numeric addresses. * diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 52824d8b34..0ed48e7936 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -613,7 +613,7 @@ destroy_task (struct Task *t) * empty. Keep running tasks until we are either no longer running * "URGENT" tasks or until we have at least one "pending" task (which * may become ready, hence we should select on it). Naturally, if - * there are no more ready tasks, we also return. + * there are no more ready tasks, we also return. * * @param rs FDs ready for reading * @param ws FDs ready for writing @@ -726,7 +726,7 @@ sighandler_shutdown () /** * Check if the system is still life. Trigger shutdown if we - * have tasks, but none of them give us lifeness. + * have tasks, but none of them give us lifeness. * * @return GNUNET_OK to continue the main loop, * GNUNET_NO to exit @@ -893,7 +893,7 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) /** * Obtain the reason code for why the current task was - * started. Will return the same value as + * started. Will return the same value as * the GNUNET_SCHEDULER_TaskContext's reason field. * * @return reason(s) why the current task is run @@ -1134,7 +1134,7 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, * will be scheduled for execution once the delay has expired. It * will be run with the priority of the calling task. * - * @param delay when should this operation time out? Use + * @param delay when should this operation time out? Use * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param task main function of the task * @param task_cls closure of task @@ -1404,7 +1404,7 @@ add_without_sets (struct GNUNET_TIME_Relative delay, int rfd, int wfd, * socket operation is ready. It will be run with the priority of * the calling task. * - * @param delay when should this operation time out? Use + * @param delay when should this operation time out? Use * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param rfd read file-descriptor * @param task main function of the task @@ -1445,7 +1445,7 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the priority of * the calling task. * - * @param delay when should this operation time out? Use + * @param delay when should this operation time out? Use * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param wfd write file-descriptor * @param task main function of the task @@ -1487,7 +1487,7 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the priority of * the calling task. * - * @param delay when should this operation time out? Use + * @param delay when should this operation time out? Use * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param rfd read file-descriptor * @param task main function of the task @@ -1531,7 +1531,7 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, * socket operation is ready. It will be run with the priority of * the calling task. * - * @param delay when should this operation time out? Use + * @param delay when should this operation time out? Use * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" * @param wfd write file-descriptor * @param task main function of the task diff --git a/src/util/server.c b/src/util/server.c index ddbae44109..ce5d16e1e1 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -742,7 +742,7 @@ process_incoming (void *cls, const void *buf, size_t available, /** * Process messages from the client's message tokenizer until either - * the tokenizer is empty (and then schedule receiving more), or + * the tokenizer is empty (and then schedule receiving more), or * until some handler is not immediately done (then wait for restart_processing) * or shutdown. * @@ -1229,10 +1229,10 @@ GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client) /** * Wrapper for transmission notification that calls the original * callback and update the last activity time for our connection. - * + * * @param cls the 'struct GNUNET_SERVER_Client' * @param size number of bytes we can transmit - * @param buf where to copy the message + * @param buf where to copy the message * @return number of bytes actually transmitted */ static size_t diff --git a/src/util/server_mst.c b/src/util/server_mst.c index 07a7b30b8d..ad3be8f63f 100644 --- a/src/util/server_mst.c +++ b/src/util/server_mst.c @@ -110,7 +110,7 @@ GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb, * @param client_identity ID of client for which this is a buffer * @param buf input data to add * @param size number of bytes in buf - * @param purge should any excess bytes in the buffer be discarded + * @param purge should any excess bytes in the buffer be discarded * (i.e. for packet-based services like UDP) * @param one_shot only call callback once, keep rest of message in buffer * @return GNUNET_OK if we are done processing (need more data) diff --git a/src/util/server_nc.c b/src/util/server_nc.c index a5ee7e0d65..7a26ab9bf7 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c @@ -21,7 +21,7 @@ /** * @file util/server_nc.c * @brief convenience functions for transmission of - * a notification stream + * a notification stream * @author Christian Grothoff */ @@ -78,7 +78,7 @@ struct ClientList struct ClientList *next; /** - * Overall context this client belongs to. + * Overall context this client belongs to. */ struct GNUNET_SERVER_NotificationContext *nc; diff --git a/src/util/service.c b/src/util/service.c index 9b60dc56b3..9e15ae1ab9 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -751,7 +751,7 @@ add_unixpath (struct sockaddr **saddrs, socklen_t * saddrlens, *saddrs = (struct sockaddr *) un; *saddrlens = slen; #else - /* this function should never be called + /* this function should never be called * unless AF_UNIX is defined! */ GNUNET_assert (0); #endif diff --git a/src/util/test_container_heap.c b/src/util/test_container_heap.c index 62d675bbbb..a2a004aa79 100644 --- a/src/util/test_container_heap.c +++ b/src/util/test_container_heap.c @@ -67,7 +67,7 @@ check () n1 = GNUNET_CONTAINER_heap_peek (myHeap); GNUNET_assert (NULL == n1); - // GNUNET_CONTAINER_heap_walk_get_next: heap empty, taking if-branch + // GNUNET_CONTAINER_heap_walk_get_next: heap empty, taking if-branch n1 = GNUNET_CONTAINER_heap_walk_get_next (myHeap); GNUNET_assert (NULL == n1); @@ -75,7 +75,7 @@ check () GNUNET_assert (NULL != n1); - // GNUNET_CONTAINER_heap_peek not empty, taking if-branch + // GNUNET_CONTAINER_heap_peek not empty, taking if-branch n2 = NULL; n2 = GNUNET_CONTAINER_heap_peek (myHeap); GNUNET_assert (NULL != n2); @@ -122,7 +122,7 @@ check () GNUNET_CONTAINER_heap_destroy (myHeap); - // My additions to a complete testcase + // My additions to a complete testcase // Testing a GNUNET_CONTAINER_HEAP_ORDER_MIN // Testing remove_node diff --git a/src/util/test_peer.c b/src/util/test_peer.c index 395d40712a..1729114ff5 100644 --- a/src/util/test_peer.c +++ b/src/util/test_peer.c @@ -32,7 +32,7 @@ #define DEBUG GNUNET_NO /** - * A list of Peer ID's to play with + * A list of Peer ID's to play with */ static struct GNUNET_PeerIdentity pidArr[NUMBER_OF_PEERS]; @@ -99,10 +99,10 @@ check () GNUNET_PEER_resolve (1, &res); GNUNET_assert (0 == memcmp (&res, &pidArr[0], sizeof (res))); - /* - * Attempt to convert pid = 0 (which is reserved) + /* + * Attempt to convert pid = 0 (which is reserved) * into a peer identity object, the peer identity memory - * is expected to be set to zero + * is expected to be set to zero */ memset (&zero, 0, sizeof (struct GNUNET_PeerIdentity)); GNUNET_log_skip (1, GNUNET_YES); diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c index 563f204eba..704dc479b8 100644 --- a/src/util/test_resolver_api.c +++ b/src/util/test_resolver_api.c @@ -32,7 +32,7 @@ #define VERBOSE GNUNET_NO -/** +/** * Using DNS root servers to check gnunet's resolver service * a.root-servers.net <-> 198.41.0.4 is a fix 1:1 mapping that should not change over years * For more information have a look at IANA's website http://www.root-servers.org/ diff --git a/src/util/time.c b/src/util/time.c index 34880b08b4..d3dd3b5eca 100644 --- a/src/util/time.c +++ b/src/util/time.c @@ -353,7 +353,7 @@ GNUNET_TIME_relative_divide (struct GNUNET_TIME_Relative rel, /** - * Calculate the estimate time of arrival/completion + * Calculate the estimate time of arrival/completion * for an operation. * * @param start when did the operation start? diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index ba7fa65d75..9e7c10a1de 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c @@ -1119,7 +1119,7 @@ cleanup_task (void *cls * @param udp_redirects * @param tcp_redirects * - * @return + * @return */ uint64_t get_port_from_redirects (const char *udp_redirects, const char *tcp_redirects) |