aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-29 10:19:43 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-29 10:19:43 +0000
commitcddbdf5b928c68ab71b40c950b9f01ea68a9fbdb (patch)
treeb704e00a3af618b2cd174a7f89514eaebd82a1cf /src/core
parentbb4fc4f4007988874f910d4de5492f9629301641 (diff)
downloadgnunet-cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb.tar.gz
gnunet-cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb.zip
run indent twice, it alternates between two 'canonical' forms, also run whitespace remover
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.h6
-rw-r--r--src/core/core_api.c16
-rw-r--r--src/core/gnunet-service-core.c28
3 files changed, 25 insertions, 25 deletions
diff --git a/src/core/core.h b/src/core/core.h
index 53d1a1b6d..37580bb82 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -378,7 +378,7 @@ struct SendMessageRequest
378 378
379 379
380/** 380/**
381 * Core notifying client that it is allowed to now 381 * Core notifying client that it is allowed to now
382 * transmit a message to the given target 382 * transmit a message to the given target
383 * (response to GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST). 383 * (response to GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST).
384 */ 384 */
@@ -390,9 +390,9 @@ struct SendMessageReady
390 struct GNUNET_MessageHeader header; 390 struct GNUNET_MessageHeader header;
391 391
392 /** 392 /**
393 * How many bytes are allowed for transmission? 393 * How many bytes are allowed for transmission?
394 * Guaranteed to be at least as big as the requested size, 394 * Guaranteed to be at least as big as the requested size,
395 * or ZERO if the request is rejected (will timeout, 395 * or ZERO if the request is rejected (will timeout,
396 * peer disconnected, queue full, etc.). 396 * peer disconnected, queue full, etc.).
397 */ 397 */
398 uint16_t size GNUNET_PACKED; 398 uint16_t size GNUNET_PACKED;
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 27754010a..30c86d0d9 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -39,14 +39,14 @@ struct PeerRecord
39 /** 39 /**
40 * We generally do NOT keep peer records in a DLL; this 40 * We generally do NOT keep peer records in a DLL; this
41 * DLL is only used IF this peer's 'pending_head' message 41 * DLL is only used IF this peer's 'pending_head' message
42 * is ready for transmission. 42 * is ready for transmission.
43 */ 43 */
44 struct PeerRecord *prev; 44 struct PeerRecord *prev;
45 45
46 /** 46 /**
47 * We generally do NOT keep peer records in a DLL; this 47 * We generally do NOT keep peer records in a DLL; this
48 * DLL is only used IF this peer's 'pending_head' message 48 * DLL is only used IF this peer's 'pending_head' message
49 * is ready for transmission. 49 * is ready for transmission.
50 */ 50 */
51 struct PeerRecord *next; 51 struct PeerRecord *next;
52 52
@@ -98,7 +98,7 @@ struct PeerRecord
98 98
99 /** 99 /**
100 * ID of timeout task for the 'pending_head' handle 100 * ID of timeout task for the 'pending_head' handle
101 * which is the one with the smallest timeout. 101 * which is the one with the smallest timeout.
102 */ 102 */
103 GNUNET_SCHEDULER_TaskIdentifier timeout_task; 103 GNUNET_SCHEDULER_TaskIdentifier timeout_task;
104 104
@@ -124,7 +124,7 @@ struct PeerRecord
124 * Entry in a doubly-linked list of control messages to be transmitted 124 * Entry in a doubly-linked list of control messages to be transmitted
125 * to the core service. Control messages include traffic allocation, 125 * to the core service. Control messages include traffic allocation,
126 * connection requests and of course our initial 'init' request. 126 * connection requests and of course our initial 'init' request.
127 * 127 *
128 * The actual message is allocated at the end of this struct. 128 * The actual message is allocated at the end of this struct.
129 */ 129 */
130struct ControlMessage 130struct ControlMessage
@@ -319,7 +319,7 @@ struct GNUNET_CORE_TransmitHandle
319 struct PeerRecord *peer; 319 struct PeerRecord *peer;
320 320
321 /** 321 /**
322 * Corresponding SEND_REQUEST message. Only non-NULL 322 * Corresponding SEND_REQUEST message. Only non-NULL
323 * while SEND_REQUEST message is pending. 323 * while SEND_REQUEST message is pending.
324 */ 324 */
325 struct ControlMessage *cm; 325 struct ControlMessage *cm;
@@ -396,7 +396,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
396 396
397 397
398/** 398/**
399 * Notify clients about disconnect and free 399 * Notify clients about disconnect and free
400 * the entry for connected peer. 400 * the entry for connected peer.
401 * 401 *
402 * @param cls the 'struct GNUNET_CORE_Handle*' 402 * @param cls the 'struct GNUNET_CORE_Handle*'
@@ -1393,7 +1393,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
1393 1393
1394 1394
1395/** 1395/**
1396 * Disconnect from the core service. This function can only 1396 * Disconnect from the core service. This function can only
1397 * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready' 1397 * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready'
1398 * requests have been explicitly canceled. 1398 * requests have been explicitly canceled.
1399 * 1399 *
@@ -1883,7 +1883,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
1883/** 1883/**
1884 * Cancel request for getting information about a peer. 1884 * Cancel request for getting information about a peer.
1885 * Note that an eventual change in preference, trust or bandwidth 1885 * Note that an eventual change in preference, trust or bandwidth
1886 * assignment MAY have already been committed at the time, 1886 * assignment MAY have already been committed at the time,
1887 * so cancelling a request is NOT sure to undo the original 1887 * so cancelling a request is NOT sure to undo the original
1888 * request. The original request may or may not still commit. 1888 * request. The original request may or may not still commit.
1889 * The only thing cancellation ensures is that the callback 1889 * 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 7385991a2..1b8bb630c 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -71,7 +71,7 @@
71 71
72/** 72/**
73 * After how much time past the "official" expiration time do 73 * After how much time past the "official" expiration time do
74 * we discard messages? Should not be zero since we may 74 * we discard messages? Should not be zero since we may
75 * intentionally defer transmission until close to the deadline 75 * intentionally defer transmission until close to the deadline
76 * and then may be slightly past the deadline due to inaccuracy 76 * and then may be slightly past the deadline due to inaccuracy
77 * in sleep and our own CPU consumption. 77 * in sleep and our own CPU consumption.
@@ -410,7 +410,7 @@ struct MessageEntry
410 410
411 411
412/** 412/**
413 * Record kept for each request for transmission issued by a 413 * Record kept for each request for transmission issued by a
414 * client that is still pending. 414 * client that is still pending.
415 */ 415 */
416struct ClientActiveRequest; 416struct ClientActiveRequest;
@@ -439,13 +439,13 @@ struct Neighbour
439 struct MessageEntry *encrypted_tail; 439 struct MessageEntry *encrypted_tail;
440 440
441 /** 441 /**
442 * Head of list of requests from clients for transmission to 442 * Head of list of requests from clients for transmission to
443 * this peer. 443 * this peer.
444 */ 444 */
445 struct ClientActiveRequest *active_client_request_head; 445 struct ClientActiveRequest *active_client_request_head;
446 446
447 /** 447 /**
448 * Tail of list of requests from clients for transmission to 448 * Tail of list of requests from clients for transmission to
449 * this peer. 449 * this peer.
450 */ 450 */
451 struct ClientActiveRequest *active_client_request_tail; 451 struct ClientActiveRequest *active_client_request_tail;
@@ -684,7 +684,7 @@ struct Client
684 684
685 685
686/** 686/**
687 * Record kept for each request for transmission issued by a 687 * Record kept for each request for transmission issued by a
688 * client that is still pending. 688 * client that is still pending.
689 */ 689 */
690struct ClientActiveRequest 690struct ClientActiveRequest
@@ -962,10 +962,10 @@ send_to_client (struct Client *client, const struct GNUNET_MessageHeader *msg,
962/** 962/**
963 * Send a message to all of our current clients that have 963 * Send a message to all of our current clients that have
964 * the right options set. 964 * the right options set.
965 * 965 *
966 * @param msg message to multicast 966 * @param msg message to multicast
967 * @param can_drop can this message be discarded if the queue is too long 967 * @param can_drop can this message be discarded if the queue is too long
968 * @param options mask to use 968 * @param options mask to use
969 */ 969 */
970static void 970static void
971send_to_all_clients (const struct GNUNET_MessageHeader *msg, int can_drop, 971send_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,
1225 (n->status != PEER_STATE_KEY_CONFIRMED)) 1225 (n->status != PEER_STATE_KEY_CONFIRMED))
1226 { 1226 {
1227 /* neighbour must have disconnected since request was issued, 1227 /* neighbour must have disconnected since request was issued,
1228 * ignore (client will realize it once it processes the 1228 * ignore (client will realize it once it processes the
1229 * disconnect notification) */ 1229 * disconnect notification) */
1230#if DEBUG_CORE_CLIENT 1230#if DEBUG_CORE_CLIENT
1231 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1231 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1705,7 +1705,7 @@ handle_client_request_info (void *cls, struct GNUNET_SERVER_Client *client,
1705 else 1705 else
1706 { 1706 {
1707 /* Technically, this COULD happen (due to asynchronous behavior), 1707 /* Technically, this COULD happen (due to asynchronous behavior),
1708 * but it should be rare, so we should generate an info event 1708 * but it should be rare, so we should generate an info event
1709 * to help diagnosis of serious errors that might be masked by this */ 1709 * to help diagnosis of serious errors that might be masked by this */
1710 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1710 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1711 _ 1711 _
@@ -1860,7 +1860,7 @@ consider_free_neighbour (struct Neighbour *n);
1860 1860
1861 1861
1862/** 1862/**
1863 * Task triggered when a neighbour entry is about to time out 1863 * Task triggered when a neighbour entry is about to time out
1864 * (and we should prevent this by sending a PING). 1864 * (and we should prevent this by sending a PING).
1865 * 1865 *
1866 * @param cls the 'struct Neighbour' 1866 * @param cls the 'struct Neighbour'
@@ -2733,7 +2733,7 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
2733/** 2733/**
2734 * Function that recalculates the bandwidth quota for the 2734 * Function that recalculates the bandwidth quota for the
2735 * given neighbour and transmits it to the transport service. 2735 * given neighbour and transmits it to the transport service.
2736 * 2736 *
2737 * @param cls neighbour for the quota update 2737 * @param cls neighbour for the quota update
2738 * @param tc context 2738 * @param tc context
2739 */ 2739 */
@@ -2850,7 +2850,7 @@ handle_client_send (void *cls, struct GNUNET_SERVER_Client *client,
2850 if ((n == NULL) || (GNUNET_YES != n->is_connected) || 2850 if ((n == NULL) || (GNUNET_YES != n->is_connected) ||
2851 (n->status != PEER_STATE_KEY_CONFIRMED)) 2851 (n->status != PEER_STATE_KEY_CONFIRMED))
2852 { 2852 {
2853 /* attempt to send message to peer that is not connected anymore 2853 /* attempt to send message to peer that is not connected anymore
2854 * (can happen due to asynchrony) */ 2854 * (can happen due to asynchrony) */
2855 GNUNET_STATISTICS_update (stats, 2855 GNUNET_STATISTICS_update (stats,
2856 gettext_noop 2856 gettext_noop
@@ -4256,7 +4256,7 @@ handle_transport_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
4256/** 4256/**
4257 * Function that recalculates the bandwidth quota for the 4257 * Function that recalculates the bandwidth quota for the
4258 * given neighbour and transmits it to the transport service. 4258 * given neighbour and transmits it to the transport service.
4259 * 4259 *
4260 * @param cls neighbour for the quota update 4260 * @param cls neighbour for the quota update
4261 * @param tc context 4261 * @param tc context
4262 */ 4262 */
@@ -4283,7 +4283,7 @@ neighbour_quota_update (void *cls,
4283 n->quota_update_task = GNUNET_SCHEDULER_NO_TASK; 4283 n->quota_update_task = GNUNET_SCHEDULER_NO_TASK;
4284 /* calculate relative preference among all neighbours; 4284 /* calculate relative preference among all neighbours;
4285 * divides by a bit more to avoid division by zero AND to 4285 * divides by a bit more to avoid division by zero AND to
4286 * account for possibility of new neighbours joining any time 4286 * account for possibility of new neighbours joining any time
4287 * AND to convert to double... */ 4287 * AND to convert to double... */
4288 neighbour_count = GNUNET_CONTAINER_multihashmap_size (neighbours); 4288 neighbour_count = GNUNET_CONTAINER_multihashmap_size (neighbours);
4289 if (neighbour_count == 0) 4289 if (neighbour_count == 0)