aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-04-25 07:59:45 +0000
committerChristian Grothoff <christian@grothoff.org>2014-04-25 07:59:45 +0000
commit344f48e48e8d4f1ea631f29d8fb3ae0faf3d7ef0 (patch)
treeef2e4f32eb08a9478a214fa2b2e183e5b60914ee /src/core
parent1aa08ac49c4458eb0643d20fff6959eea4dc27cc (diff)
downloadgnunet-344f48e48e8d4f1ea631f29d8fb3ae0faf3d7ef0.tar.gz
gnunet-344f48e48e8d4f1ea631f29d8fb3ae0faf3d7ef0.zip
-indent, doxygen
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_api.c6
-rw-r--r--src/core/gnunet-service-core_clients.c24
-rw-r--r--src/core/gnunet-service-core_kx.c6
-rw-r--r--src/core/gnunet-service-core_sessions.c6
-rw-r--r--src/core/gnunet-service-core_typemap.c4
5 files changed, 27 insertions, 19 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 7818a60a3..21bc758ff 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -191,7 +191,7 @@ struct ControlMessage
191 GNUNET_CORE_ControlContinuation cont; 191 GNUNET_CORE_ControlContinuation cont;
192 192
193 /** 193 /**
194 * Closure for 'cont'. 194 * Closure for @e cont.
195 */ 195 */
196 void *cont_cls; 196 void *cont_cls;
197 197
@@ -761,6 +761,7 @@ main_notify_handler (void *cls,
761 int trigger; 761 int trigger;
762 uint16_t msize; 762 uint16_t msize;
763 uint16_t et; 763 uint16_t et;
764
764 if (NULL == msg) 765 if (NULL == msg)
765 { 766 {
766 LOG (GNUNET_ERROR_TYPE_INFO, 767 LOG (GNUNET_ERROR_TYPE_INFO,
@@ -795,7 +796,8 @@ main_notify_handler (void *cls,
795 { 796 {
796 /* mark so we don't call init on reconnect */ 797 /* mark so we don't call init on reconnect */
797 h->init = NULL; 798 h->init = NULL;
798 LOG (GNUNET_ERROR_TYPE_DEBUG, "Connected to core service of peer `%s'.\n", 799 LOG (GNUNET_ERROR_TYPE_DEBUG,
800 "Connected to core service of peer `%s'.\n",
799 GNUNET_i2s (&h->me)); 801 GNUNET_i2s (&h->me));
800 init (h->cls, &h->me); 802 init (h->cls, &h->me);
801 } 803 }
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index 634959674..c099987a9 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -259,10 +259,11 @@ send_to_all_clients (const struct GNUNET_PeerIdentity *partner,
259 * 259 *
260 * @param cls unused 260 * @param cls unused
261 * @param client new client that sent INIT 261 * @param client new client that sent INIT
262 * @param message the 'struct InitMessage' (presumably) 262 * @param message the `struct InitMessage` (presumably)
263 */ 263 */
264static void 264static void
265handle_client_init (void *cls, struct GNUNET_SERVER_Client *client, 265handle_client_init (void *cls,
266 struct GNUNET_SERVER_Client *client,
266 const struct GNUNET_MessageHeader *message) 267 const struct GNUNET_MessageHeader *message)
267{ 268{
268 const struct InitMessage *im; 269 const struct InitMessage *im;
@@ -328,10 +329,11 @@ handle_client_init (void *cls, struct GNUNET_SERVER_Client *client,
328 * 329 *
329 * @param cls unused 330 * @param cls unused
330 * @param client new client that sent CORE_SEND_REQUEST 331 * @param client new client that sent CORE_SEND_REQUEST
331 * @param message the 'struct SendMessageRequest' (presumably) 332 * @param message the `struct SendMessageRequest` (presumably)
332 */ 333 */
333static void 334static void
334handle_client_send_request (void *cls, struct GNUNET_SERVER_Client *client, 335handle_client_send_request (void *cls,
336 struct GNUNET_SERVER_Client *client,
335 const struct GNUNET_MessageHeader *message) 337 const struct GNUNET_MessageHeader *message)
336{ 338{
337 const struct SendMessageRequest *req; 339 const struct SendMessageRequest *req;
@@ -439,7 +441,8 @@ struct TokenizerContext
439 * @param message the `struct SendMessage` 441 * @param message the `struct SendMessage`
440 */ 442 */
441static void 443static void
442handle_client_send (void *cls, struct GNUNET_SERVER_Client *client, 444handle_client_send (void *cls,
445 struct GNUNET_SERVER_Client *client,
443 const struct GNUNET_MessageHeader *message) 446 const struct GNUNET_MessageHeader *message)
444{ 447{
445 const struct SendMessage *sm; 448 const struct SendMessage *sm;
@@ -699,8 +702,7 @@ GSC_CLIENTS_reject_request (struct GSC_ClientActiveRequest *car)
699 */ 702 */
700void 703void
701GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client, 704GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
702 const struct GNUNET_PeerIdentity 705 const struct GNUNET_PeerIdentity *neighbour,
703 *neighbour,
704 const struct GSC_TypeMap *tmap_old, 706 const struct GSC_TypeMap *tmap_old,
705 const struct GSC_TypeMap *tmap_new) 707 const struct GSC_TypeMap *tmap_new)
706{ 708{
@@ -736,7 +738,8 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
736 cnm->header.size = htons (size); 738 cnm->header.size = htons (size);
737 cnm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT); 739 cnm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT);
738 cnm->reserved = htonl (0); 740 cnm->reserved = htonl (0);
739 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n", 741 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
742 "Sending `%s' message to client.\n",
740 "NOTIFY_CONNECT"); 743 "NOTIFY_CONNECT");
741 cnm->peer = *neighbour; 744 cnm->peer = *neighbour;
742 send_to_client (client, &cnm->header, GNUNET_NO); 745 send_to_client (client, &cnm->header, GNUNET_NO);
@@ -770,14 +773,13 @@ GSC_CLIENTS_notify_client_about_neighbour (struct GSC_Client *client,
770 * @param tmap_new updated type map for the neighbour, NULL for disconnect 773 * @param tmap_new updated type map for the neighbour, NULL for disconnect
771 */ 774 */
772void 775void
773GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity 776GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour,
774 *neighbour,
775 const struct GSC_TypeMap *tmap_old, 777 const struct GSC_TypeMap *tmap_old,
776 const struct GSC_TypeMap *tmap_new) 778 const struct GSC_TypeMap *tmap_new)
777{ 779{
778 struct GSC_Client *c; 780 struct GSC_Client *c;
779 781
780 for (c = client_head; c != NULL; c = c->next) 782 for (c = client_head; NULL != c; c = c->next)
781 GSC_CLIENTS_notify_client_about_neighbour (c, neighbour, 783 GSC_CLIENTS_notify_client_about_neighbour (c, neighbour,
782 tmap_old, tmap_new); 784 tmap_old, tmap_new);
783} 785}
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index 8f13dd111..38f37f01f 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -431,7 +431,8 @@ monitor_notify_all (struct GSC_KeyExchangeInfo *kx)
431 */ 431 */
432static void 432static void
433derive_auth_key (struct GNUNET_CRYPTO_AuthKey *akey, 433derive_auth_key (struct GNUNET_CRYPTO_AuthKey *akey,
434 const struct GNUNET_CRYPTO_SymmetricSessionKey *skey, uint32_t seed) 434 const struct GNUNET_CRYPTO_SymmetricSessionKey *skey,
435 uint32_t seed)
435{ 436{
436 static const char ctx[] = "authentication key"; 437 static const char ctx[] = "authentication key";
437 438
@@ -1176,7 +1177,8 @@ GSC_KX_handle_pong (struct GSC_KeyExchangeInfo *kx,
1176 "PONG", GNUNET_i2s (&t.target), (unsigned int) t.challenge); 1177 "PONG", GNUNET_i2s (&t.target), (unsigned int) t.challenge);
1177 return; 1178 return;
1178 } 1179 }
1179 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received PONG from `%s'\n", 1180 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1181 "Received PONG from `%s'\n",
1180 GNUNET_i2s (&kx->peer)); 1182 GNUNET_i2s (&kx->peer));
1181 /* no need to resend key any longer */ 1183 /* no need to resend key any longer */
1182 if (GNUNET_SCHEDULER_NO_TASK != kx->retry_set_key_task) 1184 if (GNUNET_SCHEDULER_NO_TASK != kx->retry_set_key_task)
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c
index 79a609566..00db9d1f1 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -329,7 +329,8 @@ GSC_SESSIONS_create (const struct GNUNET_PeerIdentity *peer,
329 GNUNET_CONTAINER_multipeermap_size (sessions), 329 GNUNET_CONTAINER_multipeermap_size (sessions),
330 GNUNET_NO); 330 GNUNET_NO);
331 GSC_CLIENTS_notify_clients_about_neighbour (peer, 331 GSC_CLIENTS_notify_clients_about_neighbour (peer,
332 NULL, session->tmap); 332 NULL,
333 session->tmap);
333 start_typemap_task (session); 334 start_typemap_task (session);
334} 335}
335 336
@@ -422,7 +423,8 @@ notify_client_about_session (void *cls,
422 struct GSC_Client *client = cls; 423 struct GSC_Client *client = cls;
423 struct Session *session = value; 424 struct Session *session = value;
424 425
425 GSC_CLIENTS_notify_client_about_neighbour (client, &session->peer, 426 GSC_CLIENTS_notify_client_about_neighbour (client,
427 &session->peer,
426 NULL, /* old TMAP: none */ 428 NULL, /* old TMAP: none */
427 session->tmap); 429 session->tmap);
428 return GNUNET_OK; 430 return GNUNET_OK;
diff --git a/src/core/gnunet-service-core_typemap.c b/src/core/gnunet-service-core_typemap.c
index 13f5309fb..870b90085 100644
--- a/src/core/gnunet-service-core_typemap.c
+++ b/src/core/gnunet-service-core_typemap.c
@@ -247,8 +247,8 @@ GSC_TYPEMAP_add (const uint16_t *types,
247/** 247/**
248 * Remove a set of types from our type map. 248 * Remove a set of types from our type map.
249 * 249 *
250 * @param types array of message types no longer supported by this peer 250 * @param types array of types to remove
251 * @param tlen number of entries in @a types 251 * @param tlen length of the @a types array
252 */ 252 */
253void 253void
254GSC_TYPEMAP_remove (const uint16_t *types, 254GSC_TYPEMAP_remove (const uint16_t *types,