diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-26 20:25:37 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-26 20:25:37 +0200 |
commit | aa78134a557079ce570345e751e4c36c4b2ba79a (patch) | |
tree | f7bf25950513285184e2426109235337d0aef8be /src/rps/gnunet-service-rps.c | |
parent | 1f2674fe293be7c1a852fbe4a7241fbcb149078f (diff) | |
download | gnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.tar.gz gnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.zip |
-fix many more typos
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 56eab288e..f6fcf3ae7 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -569,7 +569,7 @@ static struct GNUNET_PeerIdentity attacked_peer; | |||
569 | * This is an assumption of the Brahms protocol and either implemented | 569 | * This is an assumption of the Brahms protocol and either implemented |
570 | * via proof of work | 570 | * via proof of work |
571 | * or | 571 | * or |
572 | * assumend to be the bandwidth limitation. | 572 | * assumed to be the bandwidth limitation. |
573 | */ | 573 | */ |
574 | static uint32_t push_limit = 10000; | 574 | static uint32_t push_limit = 10000; |
575 | #endif /* ENABLE_MALICIOUS */ | 575 | #endif /* ENABLE_MALICIOUS */ |
@@ -599,6 +599,7 @@ do_round (void *cls); | |||
599 | #if ENABLE_MALICIOUS | 599 | #if ENABLE_MALICIOUS |
600 | static void | 600 | static void |
601 | do_mal_round (void *cls); | 601 | do_mal_round (void *cls); |
602 | |||
602 | #endif /* ENABLE_MALICIOUS */ | 603 | #endif /* ENABLE_MALICIOUS */ |
603 | 604 | ||
604 | 605 | ||
@@ -634,7 +635,7 @@ get_peer_ctx (const struct GNUNET_CONTAINER_MultiPeerMap *peer_map, | |||
634 | * @param peer peer in question | 635 | * @param peer peer in question |
635 | * | 636 | * |
636 | * @return #GNUNET_YES if peer is known | 637 | * @return #GNUNET_YES if peer is known |
637 | * #GNUNET_NO if peer is not knwon | 638 | * #GNUNET_NO if peer is not known |
638 | */ | 639 | */ |
639 | static int | 640 | static int |
640 | check_peer_known (const struct GNUNET_CONTAINER_MultiPeerMap *peer_map, | 641 | check_peer_known (const struct GNUNET_CONTAINER_MultiPeerMap *peer_map, |
@@ -1036,9 +1037,9 @@ get_channel (struct PeerContext *peer_ctx) | |||
1036 | * Get the message queue (#GNUNET_MQ_Handle) of a specific peer. | 1037 | * Get the message queue (#GNUNET_MQ_Handle) of a specific peer. |
1037 | * | 1038 | * |
1038 | * If we already have a message queue open to this client, | 1039 | * If we already have a message queue open to this client, |
1039 | * simply return it, otherways create one. | 1040 | * simply return it, otherwise create one. |
1040 | * | 1041 | * |
1041 | * @param peer_ctx Context of the peer of whicht to get the mq | 1042 | * @param peer_ctx Context of the peer of which to get the mq |
1042 | * @return the #GNUNET_MQ_Handle | 1043 | * @return the #GNUNET_MQ_Handle |
1043 | */ | 1044 | */ |
1044 | static struct GNUNET_MQ_Handle * | 1045 | static struct GNUNET_MQ_Handle * |
@@ -1119,7 +1120,7 @@ mq_online_check_successful (void *cls) | |||
1119 | if (NULL != peer_ctx->online_check_pending) | 1120 | if (NULL != peer_ctx->online_check_pending) |
1120 | { | 1121 | { |
1121 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1122 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1122 | "Online check for peer %s was successfull\n", | 1123 | "Online check for peer %s was successful\n", |
1123 | GNUNET_i2s (&peer_ctx->peer_id)); | 1124 | GNUNET_i2s (&peer_ctx->peer_id)); |
1124 | remove_pending_message (peer_ctx->online_check_pending, GNUNET_YES); | 1125 | remove_pending_message (peer_ctx->online_check_pending, GNUNET_YES); |
1125 | peer_ctx->online_check_pending = NULL; | 1126 | peer_ctx->online_check_pending = NULL; |
@@ -1292,7 +1293,7 @@ destroy_peer (struct PeerContext *peer_ctx) | |||
1292 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1293 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1293 | "Removing unsent %s\n", | 1294 | "Removing unsent %s\n", |
1294 | peer_ctx->pending_messages_head->type); | 1295 | peer_ctx->pending_messages_head->type); |
1295 | /* Cancle pending message, too */ | 1296 | /* Cancel pending message, too */ |
1296 | if ((NULL != peer_ctx->online_check_pending) && | 1297 | if ((NULL != peer_ctx->online_check_pending) && |
1297 | (0 == memcmp (peer_ctx->pending_messages_head, | 1298 | (0 == memcmp (peer_ctx->pending_messages_head, |
1298 | peer_ctx->online_check_pending, | 1299 | peer_ctx->online_check_pending, |
@@ -1402,7 +1403,7 @@ mq_notify_sent_cb (void *cls) | |||
1402 | if (pending_msg->peer_ctx->sub == msub) | 1403 | if (pending_msg->peer_ctx->sub == msub) |
1403 | { | 1404 | { |
1404 | if (0 == strncmp ("PULL REPLY", pending_msg->type, 10)) | 1405 | if (0 == strncmp ("PULL REPLY", pending_msg->type, 10)) |
1405 | GNUNET_STATISTICS_update (stats, "# pull replys sent", 1, GNUNET_NO); | 1406 | GNUNET_STATISTICS_update (stats, "# pull replies sent", 1, GNUNET_NO); |
1406 | if (0 == strncmp ("PULL REQUEST", pending_msg->type, 12)) | 1407 | if (0 == strncmp ("PULL REQUEST", pending_msg->type, 12)) |
1407 | GNUNET_STATISTICS_update (stats, "# pull requests sent", 1, GNUNET_NO); | 1408 | GNUNET_STATISTICS_update (stats, "# pull requests sent", 1, GNUNET_NO); |
1408 | if (0 == strncmp ("PUSH", pending_msg->type, 4)) | 1409 | if (0 == strncmp ("PUSH", pending_msg->type, 4)) |
@@ -1417,7 +1418,7 @@ mq_notify_sent_cb (void *cls) | |||
1417 | 1, | 1418 | 1, |
1418 | GNUNET_NO); | 1419 | GNUNET_NO); |
1419 | } | 1420 | } |
1420 | /* Do not cancle message */ | 1421 | /* Do not cancel message */ |
1421 | remove_pending_message (pending_msg, GNUNET_NO); | 1422 | remove_pending_message (pending_msg, GNUNET_NO); |
1422 | } | 1423 | } |
1423 | 1424 | ||
@@ -1544,7 +1545,7 @@ s2i_full (const char *string_repr) | |||
1544 | { | 1545 | { |
1545 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1546 | LOG (GNUNET_ERROR_TYPE_WARNING, |
1546 | "Not able to convert string representation of PeerID to PeerID\n" | 1547 | "Not able to convert string representation of PeerID to PeerID\n" |
1547 | "Sting representation: %s (len %lu) - too short\n", | 1548 | "String representation: %s (len %lu) - too short\n", |
1548 | string_repr, | 1549 | string_repr, |
1549 | len); | 1550 | len); |
1550 | GNUNET_break (0); | 1551 | GNUNET_break (0); |
@@ -1560,7 +1561,7 @@ s2i_full (const char *string_repr) | |||
1560 | { | 1561 | { |
1561 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1562 | LOG (GNUNET_ERROR_TYPE_WARNING, |
1562 | "Not able to convert string representation of PeerID to PeerID\n" | 1563 | "Not able to convert string representation of PeerID to PeerID\n" |
1563 | "Sting representation: %s\n", | 1564 | "String representation: %s\n", |
1564 | string_repr); | 1565 | string_repr); |
1565 | GNUNET_break (0); | 1566 | GNUNET_break (0); |
1566 | } | 1567 | } |
@@ -2428,7 +2429,7 @@ hist_update (const struct GNUNET_PeerIdentity *ids, | |||
2428 | } | 2429 | } |
2429 | #ifdef TO_FILE_FULL | 2430 | #ifdef TO_FILE_FULL |
2430 | to_file (sub->file_name_view_log, | 2431 | to_file (sub->file_name_view_log, |
2431 | "+%s\t(hist)", | 2432 | "+%s\t(history)", |
2432 | GNUNET_i2s_full (ids)); | 2433 | GNUNET_i2s_full (ids)); |
2433 | #endif /* TO_FILE_FULL */ | 2434 | #endif /* TO_FILE_FULL */ |
2434 | } | 2435 | } |
@@ -2502,6 +2503,8 @@ add_peer_array_to_set (const struct GNUNET_PeerIdentity *peer_array, | |||
2502 | } | 2503 | } |
2503 | } | 2504 | } |
2504 | } | 2505 | } |
2506 | |||
2507 | |||
2505 | #endif /* ENABLE_MALICIOUS */ | 2508 | #endif /* ENABLE_MALICIOUS */ |
2506 | 2509 | ||
2507 | 2510 | ||
@@ -2845,7 +2848,7 @@ cleanup_destroyed_channel (void *cls, | |||
2845 | else | 2848 | else |
2846 | { | 2849 | { |
2847 | /* We need this if-else construct because we need to make sure the channel | 2850 | /* We need this if-else construct because we need to make sure the channel |
2848 | * (context) is cleaned up before removing the peer, but still neet to | 2851 | * (context) is cleaned up before removing the peer, but still need to |
2849 | * compare it while checking the condition */ | 2852 | * compare it while checking the condition */ |
2850 | remove_channel_ctx (channel_ctx); | 2853 | remove_channel_ctx (channel_ctx); |
2851 | } | 2854 | } |
@@ -2998,7 +3001,7 @@ new_sub (const struct GNUNET_HashCode *hash, | |||
2998 | // /** | 3001 | // /** |
2999 | // * @brief Write all numbers in the given array into the given file | 3002 | // * @brief Write all numbers in the given array into the given file |
3000 | // * | 3003 | // * |
3001 | // * Single numbers devided by a newline | 3004 | // * Single numbers divided by a newline |
3002 | // * | 3005 | // * |
3003 | // * FIXME: The call to store_prefix_file_name expects the index of the peer, | 3006 | // * FIXME: The call to store_prefix_file_name expects the index of the peer, |
3004 | // * which cannot be known to the service. | 3007 | // * which cannot be known to the service. |
@@ -3014,14 +3017,14 @@ new_sub (const struct GNUNET_HashCode *hash, | |||
3014 | // char collect_str[SIZE_DUMP_FILE + 1] = ""; | 3017 | // char collect_str[SIZE_DUMP_FILE + 1] = ""; |
3015 | // char *recv_str_iter; | 3018 | // char *recv_str_iter; |
3016 | // char *file_name_full; | 3019 | // char *file_name_full; |
3017 | // | 3020 | // |
3018 | // recv_str_iter = collect_str; | 3021 | // recv_str_iter = collect_str; |
3019 | // file_name_full = store_prefix_file_name (&own_identity, | 3022 | // file_name_full = store_prefix_file_name (&own_identity, |
3020 | // file_name); | 3023 | // file_name); |
3021 | // for (uint32_t i = 0; i < HISTOGRAM_FILE_SLOTS; i++) | 3024 | // for (uint32_t i = 0; i < HISTOGRAM_FILE_SLOTS; i++) |
3022 | // { | 3025 | // { |
3023 | // char collect_str_tmp[8]; | 3026 | // char collect_str_tmp[8]; |
3024 | // | 3027 | // |
3025 | // GNUNET_snprintf (collect_str_tmp, | 3028 | // GNUNET_snprintf (collect_str_tmp, |
3026 | // sizeof(collect_str_tmp), | 3029 | // sizeof(collect_str_tmp), |
3027 | // "%" PRIu32 "\n", | 3030 | // "%" PRIu32 "\n", |
@@ -3213,7 +3216,7 @@ adapt_sizes (struct Sub *sub, double logestimate, double std_dev) | |||
3213 | { | 3216 | { |
3214 | double estimate; | 3217 | double estimate; |
3215 | 3218 | ||
3216 | // double scale; // TODO this might go gloabal/config | 3219 | // double scale; // TODO this might go global/config |
3217 | 3220 | ||
3218 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 3221 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
3219 | "Received a ns estimate - logest: %f, std_dev: %f (old_size: %u)\n", | 3222 | "Received a ns estimate - logest: %f, std_dev: %f (old_size: %u)\n", |
@@ -3359,7 +3362,7 @@ handle_client_seed (void *cls, | |||
3359 | * Handle RPS request from the client. | 3362 | * Handle RPS request from the client. |
3360 | * | 3363 | * |
3361 | * @param cls Client context | 3364 | * @param cls Client context |
3362 | * @param message Message containing the numer of updates the client wants to | 3365 | * @param message Message containing the number of updates the client wants to |
3363 | * receive | 3366 | * receive |
3364 | */ | 3367 | */ |
3365 | static void | 3368 | static void |