diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
commit | 61c39c60565b386e0e12ea669556b030e8cd7180 (patch) | |
tree | 59109aeab8297bdc996faca8c4e38ec7426c36cf /src/core | |
parent | 780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff) | |
download | gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip |
-remove trailing whitespace
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core_api.c | 8 | ||||
-rw-r--r-- | src/core/gnunet-core.c | 2 | ||||
-rw-r--r-- | src/core/gnunet-service-core.c | 4 | ||||
-rw-r--r-- | src/core/gnunet-service-core_clients.c | 12 | ||||
-rw-r--r-- | src/core/gnunet-service-core_kx.c | 62 | ||||
-rw-r--r-- | src/core/gnunet-service-core_neighbours.c | 4 | ||||
-rw-r--r-- | src/core/gnunet-service-core_sessions.c | 2 | ||||
-rw-r--r-- | src/core/test_core_api.c | 6 | ||||
-rw-r--r-- | src/core/test_core_api_reliability.c | 2 | ||||
-rw-r--r-- | src/core/test_core_api_send_to_self.c | 4 | ||||
-rw-r--r-- | src/core/test_core_api_start_only.c | 2 | ||||
-rw-r--r-- | src/core/test_core_quota_compliance.c | 2 |
12 files changed, 55 insertions, 55 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index 8b9389bdf..7aa3e0519 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -357,7 +357,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
357 | * @return #GNUNET_YES (continue) | 357 | * @return #GNUNET_YES (continue) |
358 | */ | 358 | */ |
359 | static int | 359 | static int |
360 | disconnect_and_free_peer_entry (void *cls, | 360 | disconnect_and_free_peer_entry (void *cls, |
361 | const struct GNUNET_PeerIdentity *key, | 361 | const struct GNUNET_PeerIdentity *key, |
362 | void *value) | 362 | void *value) |
363 | { | 363 | { |
@@ -572,7 +572,7 @@ transmission_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
572 | * @param cls closure with the 'struct GNUNET_CORE_Handle' | 572 | * @param cls closure with the 'struct GNUNET_CORE_Handle' |
573 | * @param size number of bytes available in @a buf | 573 | * @param size number of bytes available in @a buf |
574 | * @param buf where the callee should write the message | 574 | * @param buf where the callee should write the message |
575 | * @return number of bytes written to buf | 575 | * @return number of bytes written to buf |
576 | */ | 576 | */ |
577 | static size_t | 577 | static size_t |
578 | transmit_message (void *cls, size_t size, void *buf) | 578 | transmit_message (void *cls, size_t size, void *buf) |
@@ -649,7 +649,7 @@ transmit_message (void *cls, size_t size, void *buf) | |||
649 | ret = | 649 | ret = |
650 | th->get_message (th->get_message_cls, | 650 | th->get_message (th->get_message_cls, |
651 | size - sizeof (struct SendMessage), &sm[1]); | 651 | size - sizeof (struct SendMessage), &sm[1]); |
652 | 652 | ||
653 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 653 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
654 | "Transmitting SEND request to `%s' yielded %u bytes.\n", | 654 | "Transmitting SEND request to `%s' yielded %u bytes.\n", |
655 | GNUNET_i2s (&pr->peer), ret); | 655 | GNUNET_i2s (&pr->peer), ret); |
@@ -1093,7 +1093,7 @@ reconnect (struct GNUNET_CORE_Handle *h) | |||
1093 | else | 1093 | else |
1094 | opt |= GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND; | 1094 | opt |= GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND; |
1095 | } | 1095 | } |
1096 | LOG (GNUNET_ERROR_TYPE_INFO, | 1096 | LOG (GNUNET_ERROR_TYPE_INFO, |
1097 | "(Re)connecting to CORE service, monitoring messages of type %u\n", | 1097 | "(Re)connecting to CORE service, monitoring messages of type %u\n", |
1098 | opt); | 1098 | opt); |
1099 | 1099 | ||
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c index cfdae33bf..4dbe49c50 100644 --- a/src/core/gnunet-core.c +++ b/src/core/gnunet-core.c | |||
@@ -72,7 +72,7 @@ shutdown_task (void *cls, | |||
72 | * @param peer peer identity this notification is about | 72 | * @param peer peer identity this notification is about |
73 | */ | 73 | */ |
74 | static void | 74 | static void |
75 | connected_peer_callback (void *cls, | 75 | connected_peer_callback (void *cls, |
76 | const struct GNUNET_PeerIdentity *peer) | 76 | const struct GNUNET_PeerIdentity *peer) |
77 | { | 77 | { |
78 | if (NULL == peer) | 78 | if (NULL == peer) |
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 5665fc82a..ada9b7bd9 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -58,7 +58,7 @@ static struct GNUNET_SERVER_Handle *GSC_server; | |||
58 | /** | 58 | /** |
59 | * Last task run during shutdown. Disconnects us from | 59 | * Last task run during shutdown. Disconnects us from |
60 | * the transport. | 60 | * the transport. |
61 | * | 61 | * |
62 | * @param cls NULL, unused | 62 | * @param cls NULL, unused |
63 | * @param tc scheduler context, unused | 63 | * @param tc scheduler context, unused |
64 | */ | 64 | */ |
@@ -114,7 +114,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
114 | pk = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); | 114 | pk = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
115 | GNUNET_free (keyfile); | 115 | GNUNET_free (keyfile); |
116 | GNUNET_assert (NULL != pk); | 116 | GNUNET_assert (NULL != pk); |
117 | if ((GNUNET_OK != GSC_KX_init (pk)) || | 117 | if ((GNUNET_OK != GSC_KX_init (pk)) || |
118 | (GNUNET_OK != GSC_NEIGHBOURS_init ())) | 118 | (GNUNET_OK != GSC_NEIGHBOURS_init ())) |
119 | { | 119 | { |
120 | GNUNET_SCHEDULER_shutdown (); | 120 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c index bcbb56ef3..55ebb9132 100644 --- a/src/core/gnunet-service-core_clients.c +++ b/src/core/gnunet-service-core_clients.c | |||
@@ -517,7 +517,7 @@ client_tokenizer_callback (void *cls, void *client, | |||
517 | GNUNET_snprintf (buf, sizeof (buf), | 517 | GNUNET_snprintf (buf, sizeof (buf), |
518 | gettext_noop ("# bytes of messages of type %u received"), | 518 | gettext_noop ("# bytes of messages of type %u received"), |
519 | (unsigned int) ntohs (message->type)); | 519 | (unsigned int) ntohs (message->type)); |
520 | GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO); | 520 | GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO); |
521 | if (0 == | 521 | if (0 == |
522 | memcmp (&car->target, &GSC_my_identity, | 522 | memcmp (&car->target, &GSC_my_identity, |
523 | sizeof (struct GNUNET_PeerIdentity))) | 523 | sizeof (struct GNUNET_PeerIdentity))) |
@@ -536,7 +536,7 @@ client_tokenizer_callback (void *cls, void *client, | |||
536 | GNUNET_CORE_OPTION_SEND_FULL_INBOUND); | 536 | GNUNET_CORE_OPTION_SEND_FULL_INBOUND); |
537 | GSC_CLIENTS_deliver_message (&GSC_my_identity, message, | 537 | GSC_CLIENTS_deliver_message (&GSC_my_identity, message, |
538 | sizeof (struct GNUNET_MessageHeader), | 538 | sizeof (struct GNUNET_MessageHeader), |
539 | GNUNET_CORE_OPTION_SEND_HDR_INBOUND); | 539 | GNUNET_CORE_OPTION_SEND_HDR_INBOUND); |
540 | } | 540 | } |
541 | else | 541 | else |
542 | { | 542 | { |
@@ -548,7 +548,7 @@ client_tokenizer_callback (void *cls, void *client, | |||
548 | GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND); | 548 | GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND); |
549 | GSC_CLIENTS_deliver_message (&car->target, message, | 549 | GSC_CLIENTS_deliver_message (&car->target, message, |
550 | sizeof (struct GNUNET_MessageHeader), | 550 | sizeof (struct GNUNET_MessageHeader), |
551 | GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND); | 551 | GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND); |
552 | GSC_SESSIONS_transmit (car, message, tc->cork); | 552 | GSC_SESSIONS_transmit (car, message, tc->cork); |
553 | } | 553 | } |
554 | return GNUNET_OK; | 554 | return GNUNET_OK; |
@@ -564,7 +564,7 @@ client_tokenizer_callback (void *cls, void *client, | |||
564 | * @return #GNUNET_YES (continue iteration) | 564 | * @return #GNUNET_YES (continue iteration) |
565 | */ | 565 | */ |
566 | static int | 566 | static int |
567 | destroy_active_client_request (void *cls, | 567 | destroy_active_client_request (void *cls, |
568 | const struct GNUNET_PeerIdentity *key, | 568 | const struct GNUNET_PeerIdentity *key, |
569 | void *value) | 569 | void *value) |
570 | { | 570 | { |
@@ -765,7 +765,7 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity | |||
765 | struct GSC_Client *c; | 765 | struct GSC_Client *c; |
766 | 766 | ||
767 | for (c = client_head; c != NULL; c = c->next) | 767 | for (c = client_head; c != NULL; c = c->next) |
768 | GSC_CLIENTS_notify_client_about_neighbour (c, neighbour, | 768 | GSC_CLIENTS_notify_client_about_neighbour (c, neighbour, |
769 | tmap_old, tmap_new); | 769 | tmap_old, tmap_new); |
770 | } | 770 | } |
771 | 771 | ||
@@ -784,7 +784,7 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity | |||
784 | void | 784 | void |
785 | GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, | 785 | GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender, |
786 | const struct GNUNET_MessageHeader *msg, | 786 | const struct GNUNET_MessageHeader *msg, |
787 | uint16_t msize, | 787 | uint16_t msize, |
788 | uint32_t options) | 788 | uint32_t options) |
789 | { | 789 | { |
790 | size_t size = msize + sizeof (struct NotifyTrafficMessage); | 790 | size_t size = msize + sizeof (struct NotifyTrafficMessage); |
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index bf3c5cdaf..a74b3ae74 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c | |||
@@ -101,7 +101,7 @@ struct EphemeralKeyMessage | |||
101 | * At what time was this key created (beginning of validity). | 101 | * At what time was this key created (beginning of validity). |
102 | */ | 102 | */ |
103 | struct GNUNET_TIME_AbsoluteNBO creation_time; | 103 | struct GNUNET_TIME_AbsoluteNBO creation_time; |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * When does the given ephemeral key expire (end of validity). | 106 | * When does the given ephemeral key expire (end of validity). |
107 | */ | 107 | */ |
@@ -111,7 +111,7 @@ struct EphemeralKeyMessage | |||
111 | * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable | 111 | * Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable |
112 | * for network transmission as created using 'gcry_sexp_sprint'. | 112 | * for network transmission as created using 'gcry_sexp_sprint'. |
113 | */ | 113 | */ |
114 | struct GNUNET_CRYPTO_EccPublicEncryptKey ephemeral_key; | 114 | struct GNUNET_CRYPTO_EccPublicEncryptKey ephemeral_key; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Public key of the signing peer (persistent version, not the ephemeral public key). | 117 | * Public key of the signing peer (persistent version, not the ephemeral public key). |
@@ -407,7 +407,7 @@ static struct GSC_KeyExchangeInfo *kx_tail; | |||
407 | /** | 407 | /** |
408 | * Task scheduled for periodic re-generation (and thus rekeying) of our | 408 | * Task scheduled for periodic re-generation (and thus rekeying) of our |
409 | * ephemeral key. | 409 | * ephemeral key. |
410 | */ | 410 | */ |
411 | static GNUNET_SCHEDULER_TaskIdentifier rekey_task; | 411 | static GNUNET_SCHEDULER_TaskIdentifier rekey_task; |
412 | 412 | ||
413 | 413 | ||
@@ -424,10 +424,10 @@ derive_auth_key (struct GNUNET_CRYPTO_AuthKey *akey, | |||
424 | { | 424 | { |
425 | static const char ctx[] = "authentication key"; | 425 | static const char ctx[] = "authentication key"; |
426 | 426 | ||
427 | GNUNET_CRYPTO_hmac_derive_key (akey, skey, | 427 | GNUNET_CRYPTO_hmac_derive_key (akey, skey, |
428 | &seed, sizeof (seed), | 428 | &seed, sizeof (seed), |
429 | skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey), | 429 | skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey), |
430 | ctx, sizeof (ctx), | 430 | ctx, sizeof (ctx), |
431 | NULL); | 431 | NULL); |
432 | } | 432 | } |
433 | 433 | ||
@@ -473,8 +473,8 @@ derive_pong_iv (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, | |||
473 | GNUNET_CRYPTO_symmetric_derive_iv (iv, skey, &seed, sizeof (seed), | 473 | GNUNET_CRYPTO_symmetric_derive_iv (iv, skey, &seed, sizeof (seed), |
474 | identity, | 474 | identity, |
475 | sizeof (struct GNUNET_PeerIdentity), | 475 | sizeof (struct GNUNET_PeerIdentity), |
476 | &challenge, sizeof (challenge), | 476 | &challenge, sizeof (challenge), |
477 | ctx, sizeof (ctx), | 477 | ctx, sizeof (ctx), |
478 | NULL); | 478 | NULL); |
479 | } | 479 | } |
480 | 480 | ||
@@ -485,7 +485,7 @@ derive_pong_iv (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv, | |||
485 | * @param sender peer identity of the sender | 485 | * @param sender peer identity of the sender |
486 | * @param receiver peer identity of the sender | 486 | * @param receiver peer identity of the sender |
487 | * @param key_material high entropy key material to use | 487 | * @param key_material high entropy key material to use |
488 | * @param skey set to derived session key | 488 | * @param skey set to derived session key |
489 | */ | 489 | */ |
490 | static void | 490 | static void |
491 | derive_aes_key (const struct GNUNET_PeerIdentity *sender, | 491 | derive_aes_key (const struct GNUNET_PeerIdentity *sender, |
@@ -661,7 +661,7 @@ GSC_KX_start (const struct GNUNET_PeerIdentity *pid) | |||
661 | struct GNUNET_HashCode h1; | 661 | struct GNUNET_HashCode h1; |
662 | struct GNUNET_HashCode h2; | 662 | struct GNUNET_HashCode h2; |
663 | 663 | ||
664 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 664 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
665 | "Initiating key exchange with `%s'\n", | 665 | "Initiating key exchange with `%s'\n", |
666 | GNUNET_i2s (pid)); | 666 | GNUNET_i2s (pid)); |
667 | GNUNET_STATISTICS_update (GSC_stats, | 667 | GNUNET_STATISTICS_update (GSC_stats, |
@@ -675,12 +675,12 @@ GSC_KX_start (const struct GNUNET_PeerIdentity *pid) | |||
675 | kx); | 675 | kx); |
676 | GNUNET_CRYPTO_hash (pid, sizeof (struct GNUNET_PeerIdentity), &h1); | 676 | GNUNET_CRYPTO_hash (pid, sizeof (struct GNUNET_PeerIdentity), &h1); |
677 | GNUNET_CRYPTO_hash (&GSC_my_identity, sizeof (struct GNUNET_PeerIdentity), &h2); | 677 | GNUNET_CRYPTO_hash (&GSC_my_identity, sizeof (struct GNUNET_PeerIdentity), &h2); |
678 | 678 | ||
679 | if (0 < GNUNET_CRYPTO_hash_cmp (&h1, | 679 | if (0 < GNUNET_CRYPTO_hash_cmp (&h1, |
680 | &h2)) | 680 | &h2)) |
681 | { | 681 | { |
682 | /* peer with "lower" identity starts KX, otherwise we typically end up | 682 | /* peer with "lower" identity starts KX, otherwise we typically end up |
683 | with both peers starting the exchange and transmit the 'set key' | 683 | with both peers starting the exchange and transmit the 'set key' |
684 | message twice */ | 684 | message twice */ |
685 | kx->status = KX_STATE_KEY_SENT; | 685 | kx->status = KX_STATE_KEY_SENT; |
686 | send_key (kx); | 686 | send_key (kx); |
@@ -744,10 +744,10 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
744 | struct GNUNET_TIME_Absolute start_t; | 744 | struct GNUNET_TIME_Absolute start_t; |
745 | struct GNUNET_TIME_Absolute end_t; | 745 | struct GNUNET_TIME_Absolute end_t; |
746 | struct GNUNET_TIME_Absolute now; | 746 | struct GNUNET_TIME_Absolute now; |
747 | enum KxStateMachine sender_status; | 747 | enum KxStateMachine sender_status; |
748 | uint16_t size; | 748 | uint16_t size; |
749 | struct GNUNET_HashCode key_material; | 749 | struct GNUNET_HashCode key_material; |
750 | 750 | ||
751 | size = ntohs (msg->size); | 751 | size = ntohs (msg->size); |
752 | if (sizeof (struct EphemeralKeyMessage) != size) | 752 | if (sizeof (struct EphemeralKeyMessage) != size) |
753 | { | 753 | { |
@@ -758,7 +758,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
758 | end_t = GNUNET_TIME_absolute_ntoh (m->expiration_time); | 758 | end_t = GNUNET_TIME_absolute_ntoh (m->expiration_time); |
759 | if ( ( (KX_STATE_KEY_RECEIVED == kx->status) || | 759 | if ( ( (KX_STATE_KEY_RECEIVED == kx->status) || |
760 | (KX_STATE_UP == kx->status) || | 760 | (KX_STATE_UP == kx->status) || |
761 | (KX_STATE_REKEY_SENT == kx->status) ) && | 761 | (KX_STATE_REKEY_SENT == kx->status) ) && |
762 | (end_t.abs_value_us <= kx->foreign_key_expires.abs_value_us) ) | 762 | (end_t.abs_value_us <= kx->foreign_key_expires.abs_value_us) ) |
763 | { | 763 | { |
764 | GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys ignored"), | 764 | GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys ignored"), |
@@ -777,7 +777,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
777 | memcmp (&m->origin_identity, | 777 | memcmp (&m->origin_identity, |
778 | &kx->peer.public_key, | 778 | &kx->peer.public_key, |
779 | sizeof (struct GNUNET_PeerIdentity))) | 779 | sizeof (struct GNUNET_PeerIdentity))) |
780 | { | 780 | { |
781 | GNUNET_break_op (0); | 781 | GNUNET_break_op (0); |
782 | return; | 782 | return; |
783 | } | 783 | } |
@@ -810,7 +810,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
810 | } | 810 | } |
811 | if (GNUNET_OK != | 811 | if (GNUNET_OK != |
812 | GNUNET_CRYPTO_ecc_ecdh (my_ephemeral_key, | 812 | GNUNET_CRYPTO_ecc_ecdh (my_ephemeral_key, |
813 | &m->ephemeral_key, | 813 | &m->ephemeral_key, |
814 | &key_material)) | 814 | &key_material)) |
815 | { | 815 | { |
816 | GNUNET_break (0); | 816 | GNUNET_break (0); |
@@ -834,7 +834,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
834 | setup_fresh_ping (kx); | 834 | setup_fresh_ping (kx); |
835 | 835 | ||
836 | /* check if we still need to send the sender our key */ | 836 | /* check if we still need to send the sender our key */ |
837 | sender_status = (enum KxStateMachine) ntohl (m->sender_status); | 837 | sender_status = (enum KxStateMachine) ntohl (m->sender_status); |
838 | switch (sender_status) | 838 | switch (sender_status) |
839 | { | 839 | { |
840 | case KX_STATE_DOWN: | 840 | case KX_STATE_DOWN: |
@@ -844,7 +844,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
844 | /* fine, need to send our key after updating our status, see below */ | 844 | /* fine, need to send our key after updating our status, see below */ |
845 | break; | 845 | break; |
846 | case KX_STATE_KEY_RECEIVED: | 846 | case KX_STATE_KEY_RECEIVED: |
847 | case KX_STATE_UP: | 847 | case KX_STATE_UP: |
848 | case KX_STATE_REKEY_SENT: | 848 | case KX_STATE_REKEY_SENT: |
849 | /* other peer already got our key */ | 849 | /* other peer already got our key */ |
850 | break; | 850 | break; |
@@ -875,7 +875,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx, | |||
875 | send_key (kx); | 875 | send_key (kx); |
876 | send_ping (kx); | 876 | send_ping (kx); |
877 | break; | 877 | break; |
878 | case KX_STATE_UP: | 878 | case KX_STATE_UP: |
879 | kx->status = KX_STATE_REKEY_SENT; | 879 | kx->status = KX_STATE_REKEY_SENT; |
880 | if (KX_STATE_KEY_SENT == sender_status) | 880 | if (KX_STATE_KEY_SENT == sender_status) |
881 | send_key (kx); | 881 | send_key (kx); |
@@ -922,7 +922,7 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx, | |||
922 | GNUNET_STATISTICS_update (GSC_stats, | 922 | GNUNET_STATISTICS_update (GSC_stats, |
923 | gettext_noop ("# PING messages received"), 1, | 923 | gettext_noop ("# PING messages received"), 1, |
924 | GNUNET_NO); | 924 | GNUNET_NO); |
925 | if ( (kx->status != KX_STATE_KEY_RECEIVED) && | 925 | if ( (kx->status != KX_STATE_KEY_RECEIVED) && |
926 | (kx->status != KX_STATE_UP) && | 926 | (kx->status != KX_STATE_UP) && |
927 | (kx->status != KX_STATE_REKEY_SENT)) | 927 | (kx->status != KX_STATE_REKEY_SENT)) |
928 | { | 928 | { |
@@ -1128,7 +1128,7 @@ GSC_KX_handle_pong (struct GSC_KeyExchangeInfo *kx, | |||
1128 | { | 1128 | { |
1129 | GNUNET_SCHEDULER_cancel (kx->retry_set_key_task); | 1129 | GNUNET_SCHEDULER_cancel (kx->retry_set_key_task); |
1130 | kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK; | 1130 | kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK; |
1131 | } | 1131 | } |
1132 | switch (kx->status) | 1132 | switch (kx->status) |
1133 | { | 1133 | { |
1134 | case KX_STATE_DOWN: | 1134 | case KX_STATE_DOWN: |
@@ -1184,11 +1184,11 @@ send_key (struct GSC_KeyExchangeInfo *kx) | |||
1184 | kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK; | 1184 | kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK; |
1185 | } | 1185 | } |
1186 | /* always update sender status in SET KEY message */ | 1186 | /* always update sender status in SET KEY message */ |
1187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1188 | "Sending key to `%s' (my status: %d)\n", | 1188 | "Sending key to `%s' (my status: %d)\n", |
1189 | GNUNET_i2s (&kx->peer), | 1189 | GNUNET_i2s (&kx->peer), |
1190 | kx->status); | 1190 | kx->status); |
1191 | current_ekm.sender_status = htonl ((int32_t) (kx->status)); | 1191 | current_ekm.sender_status = htonl ((int32_t) (kx->status)); |
1192 | GSC_NEIGHBOURS_transmit (&kx->peer, ¤t_ekm.header, | 1192 | GSC_NEIGHBOURS_transmit (&kx->peer, ¤t_ekm.header, |
1193 | kx->set_key_retry_frequency); | 1193 | kx->set_key_retry_frequency); |
1194 | kx->retry_set_key_task = | 1194 | kx->retry_set_key_task = |
@@ -1236,8 +1236,8 @@ GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx, | |||
1236 | used - ENCRYPTED_HEADER_SIZE)); | 1236 | used - ENCRYPTED_HEADER_SIZE)); |
1237 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted %u bytes for %s\n", | 1237 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted %u bytes for %s\n", |
1238 | used - ENCRYPTED_HEADER_SIZE, GNUNET_i2s (&kx->peer)); | 1238 | used - ENCRYPTED_HEADER_SIZE, GNUNET_i2s (&kx->peer)); |
1239 | derive_auth_key (&auth_key, | 1239 | derive_auth_key (&auth_key, |
1240 | &kx->encrypt_key, | 1240 | &kx->encrypt_key, |
1241 | ph->iv_seed); | 1241 | ph->iv_seed); |
1242 | GNUNET_CRYPTO_hmac (&auth_key, &em->sequence_number, | 1242 | GNUNET_CRYPTO_hmac (&auth_key, &em->sequence_number, |
1243 | used - ENCRYPTED_HEADER_SIZE, &em->hmac); | 1243 | used - ENCRYPTED_HEADER_SIZE, &em->hmac); |
@@ -1327,8 +1327,8 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx, | |||
1327 | if (0 != memcmp (&ph, &m->hmac, sizeof (struct GNUNET_HashCode))) | 1327 | if (0 != memcmp (&ph, &m->hmac, sizeof (struct GNUNET_HashCode))) |
1328 | { | 1328 | { |
1329 | /* checksum failed */ | 1329 | /* checksum failed */ |
1330 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1330 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1331 | "Failed checksum validation for a message from `%s'\n", | 1331 | "Failed checksum validation for a message from `%s'\n", |
1332 | GNUNET_i2s (&kx->peer)); | 1332 | GNUNET_i2s (&kx->peer)); |
1333 | return; | 1333 | return; |
1334 | } | 1334 | } |
@@ -1542,7 +1542,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk) | |||
1542 | { | 1542 | { |
1543 | GNUNET_assert (NULL != pk); | 1543 | GNUNET_assert (NULL != pk); |
1544 | my_private_key = pk; | 1544 | my_private_key = pk; |
1545 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, | 1545 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, |
1546 | &GSC_my_identity.public_key); | 1546 | &GSC_my_identity.public_key); |
1547 | if (GNUNET_YES == | 1547 | if (GNUNET_YES == |
1548 | GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, | 1548 | GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg, |
diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c index d82d119d7..6eff065d9 100644 --- a/src/core/gnunet-service-core_neighbours.c +++ b/src/core/gnunet-service-core_neighbours.c | |||
@@ -479,8 +479,8 @@ GSC_NEIGHBOURS_init () | |||
479 | * @return GNUNET_OK (continue to iterate) | 479 | * @return GNUNET_OK (continue to iterate) |
480 | */ | 480 | */ |
481 | static int | 481 | static int |
482 | free_neighbour_helper (void *cls, | 482 | free_neighbour_helper (void *cls, |
483 | const struct GNUNET_PeerIdentity * key, | 483 | const struct GNUNET_PeerIdentity * key, |
484 | void *value) | 484 | void *value) |
485 | { | 485 | { |
486 | struct Neighbour *n = value; | 486 | struct Neighbour *n = value; |
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index 6c66086bd..a8d3d3609 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c | |||
@@ -199,7 +199,7 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid) | |||
199 | GNUNET_free (sme); | 199 | GNUNET_free (sme); |
200 | } | 200 | } |
201 | GNUNET_SCHEDULER_cancel (session->typemap_task); | 201 | GNUNET_SCHEDULER_cancel (session->typemap_task); |
202 | GSC_CLIENTS_notify_clients_about_neighbour (&session->peer, | 202 | GSC_CLIENTS_notify_clients_about_neighbour (&session->peer, |
203 | session->tmap, NULL); | 203 | session->tmap, NULL); |
204 | GNUNET_assert (GNUNET_YES == | 204 | GNUNET_assert (GNUNET_YES == |
205 | GNUNET_CONTAINER_multipeermap_remove (sessions, | 205 | GNUNET_CONTAINER_multipeermap_remove (sessions, |
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 0ec3112a1..12745c984 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -263,7 +263,7 @@ connect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
263 | 263 | ||
264 | 264 | ||
265 | static void | 265 | static void |
266 | init_notify (void *cls, | 266 | init_notify (void *cls, |
267 | const struct GNUNET_PeerIdentity *my_identity) | 267 | const struct GNUNET_PeerIdentity *my_identity) |
268 | { | 268 | { |
269 | struct PeerContext *p = cls; | 269 | struct PeerContext *p = cls; |
@@ -299,8 +299,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
299 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 299 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
300 | p->cfg = GNUNET_CONFIGURATION_create (); | 300 | p->cfg = GNUNET_CONFIGURATION_create (); |
301 | p->arm_proc = | 301 | p->arm_proc = |
302 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 302 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
303 | NULL, NULL, | 303 | NULL, NULL, |
304 | binary, | 304 | binary, |
305 | "gnunet-service-arm", | 305 | "gnunet-service-arm", |
306 | "-c", cfgname, NULL); | 306 | "-c", cfgname, NULL); |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 14e1e4db3..ddc3c585e 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -356,7 +356,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
356 | 356 | ||
357 | 357 | ||
358 | static void | 358 | static void |
359 | init_notify (void *cls, | 359 | init_notify (void *cls, |
360 | const struct GNUNET_PeerIdentity *my_identity) | 360 | const struct GNUNET_PeerIdentity *my_identity) |
361 | { | 361 | { |
362 | struct PeerContext *p = cls; | 362 | struct PeerContext *p = cls; |
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c index 4e2ee3fe4..913ae3848 100644 --- a/src/core/test_core_api_send_to_self.c +++ b/src/core/test_core_api_send_to_self.c | |||
@@ -103,7 +103,7 @@ send_message (void *cls, size_t size, void *buf) | |||
103 | 103 | ||
104 | 104 | ||
105 | static void | 105 | static void |
106 | init (void *cls, | 106 | init (void *cls, |
107 | const struct GNUNET_PeerIdentity *my_identity) | 107 | const struct GNUNET_PeerIdentity *my_identity) |
108 | { | 108 | { |
109 | if (NULL == my_identity) | 109 | if (NULL == my_identity) |
@@ -152,7 +152,7 @@ run (void *cls, | |||
152 | }; | 152 | }; |
153 | core = | 153 | core = |
154 | GNUNET_CORE_connect (cfg, NULL, &init, &connect_cb, NULL, NULL, | 154 | GNUNET_CORE_connect (cfg, NULL, &init, &connect_cb, NULL, NULL, |
155 | 0, NULL, 0, handlers); | 155 | 0, NULL, 0, handlers); |
156 | die_task = | 156 | die_task = |
157 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 157 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
158 | (GNUNET_TIME_UNIT_SECONDS, 300), &cleanup, | 158 | (GNUNET_TIME_UNIT_SECONDS, 300), &cleanup, |
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index dfcc40e87..0389a908e 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -103,7 +103,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | 103 | ||
104 | 104 | ||
105 | static void | 105 | static void |
106 | init_notify (void *cls, | 106 | init_notify (void *cls, |
107 | const struct GNUNET_PeerIdentity *my_identity) | 107 | const struct GNUNET_PeerIdentity *my_identity) |
108 | { | 108 | { |
109 | struct PeerContext *p = cls; | 109 | struct PeerContext *p = cls; |
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 94adc804b..7c1b198c9 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -498,7 +498,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
498 | 498 | ||
499 | 499 | ||
500 | static void | 500 | static void |
501 | init_notify (void *cls, | 501 | init_notify (void *cls, |
502 | const struct GNUNET_PeerIdentity *my_identity) | 502 | const struct GNUNET_PeerIdentity *my_identity) |
503 | { | 503 | { |
504 | struct PeerContext *p = cls; | 504 | struct PeerContext *p = cls; |