aboutsummaryrefslogtreecommitdiff
path: root/src/rps
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-26 20:25:37 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-26 20:25:37 +0200
commitaa78134a557079ce570345e751e4c36c4b2ba79a (patch)
treef7bf25950513285184e2426109235337d0aef8be /src/rps
parent1f2674fe293be7c1a852fbe4a7241fbcb149078f (diff)
downloadgnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.tar.gz
gnunet-aa78134a557079ce570345e751e4c36c4b2ba79a.zip
-fix many more typos
Diffstat (limited to 'src/rps')
-rw-r--r--src/rps/gnunet-rps-profiler.c10
-rw-r--r--src/rps/gnunet-service-rps.c37
-rw-r--r--src/rps/gnunet-service-rps_custommap.c4
-rw-r--r--src/rps/rps-sampler_common.c4
-rw-r--r--src/rps/rps-test_util.c2
-rw-r--r--src/rps/rps_api.c10
-rw-r--r--src/rps/test_rps.c10
7 files changed, 40 insertions, 37 deletions
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c
index 908dcca17..6d1236f08 100644
--- a/src/rps/gnunet-rps-profiler.c
+++ b/src/rps/gnunet-rps-profiler.c
@@ -44,7 +44,7 @@
44static uint32_t num_peers; 44static uint32_t num_peers;
45 45
46/** 46/**
47 * @brief numer of bits required to represent the largest peer id 47 * @brief number of bits required to represent the largest peer id
48 */ 48 */
49static unsigned bits_needed; 49static unsigned bits_needed;
50 50
@@ -127,7 +127,7 @@ static char*stat_type_strings[] = {
127 "# pushes sent", 127 "# pushes sent",
128 "# pull requests sent", 128 "# pull requests sent",
129 "# pull requests sent (multi-hop peer)", 129 "# pull requests sent (multi-hop peer)",
130 "# pull replys sent", 130 "# pull replies sent",
131 "# push message received", 131 "# push message received",
132 "# push message received (multi-hop peer)", 132 "# push message received (multi-hop peer)",
133 "# pull request message received", 133 "# pull request message received",
@@ -1173,7 +1173,7 @@ trigger_shutdown (void *cls)
1173 (void) cls; 1173 (void) cls;
1174 1174
1175 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1175 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1176 "Shutdown was triggerd by timeout, going down.\n"); 1176 "Shutdown was triggered by timeout, going down.\n");
1177 shutdown_task = NULL; 1177 shutdown_task = NULL;
1178 GNUNET_SCHEDULER_shutdown (); 1178 GNUNET_SCHEDULER_shutdown ();
1179} 1179}
@@ -2091,7 +2091,7 @@ profiler_cb (struct RPSPeer *rps_peer)
2091 } 2091 }
2092 2092
2093 /* Only request peer ids at one peer. 2093 /* Only request peer ids at one peer.
2094 * (It's the before-last because last one is target of the focussed attack.) 2094 * (It's the before-last because last one is target of the focused attack.)
2095 */ 2095 */
2096 if (0 < rps_peer->num_ids_to_request) 2096 if (0 < rps_peer->num_ids_to_request)
2097 schedule_missing_requests (rps_peer); 2097 schedule_missing_requests (rps_peer);
@@ -2468,7 +2468,7 @@ void
2468compute_diversity () 2468compute_diversity ()
2469{ 2469{
2470 uint32_t i; 2470 uint32_t i;
2471 /* ith entry represents the numer of occurrences in other peer's views */ 2471 /* ith entry represents the number of occurrences in other peer's views */
2472 uint32_t *count_peers = GNUNET_new_array (num_peers, uint32_t); 2472 uint32_t *count_peers = GNUNET_new_array (num_peers, uint32_t);
2473 uint32_t views_total_size; 2473 uint32_t views_total_size;
2474 double expected; 2474 double expected;
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 */
574static uint32_t push_limit = 10000; 574static 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
600static void 600static void
601do_mal_round (void *cls); 601do_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 */
639static int 640static int
640check_peer_known (const struct GNUNET_CONTAINER_MultiPeerMap *peer_map, 641check_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 */
1044static struct GNUNET_MQ_Handle * 1045static 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 */
3365static void 3368static void
diff --git a/src/rps/gnunet-service-rps_custommap.c b/src/rps/gnunet-service-rps_custommap.c
index 392c29397..b1e73be17 100644
--- a/src/rps/gnunet-service-rps_custommap.c
+++ b/src/rps/gnunet-service-rps_custommap.c
@@ -48,10 +48,10 @@
48 * 48 *
49 * This list is expected to 49 * This list is expected to
50 * - be altered in small steps frequently 50 * - be altered in small steps frequently
51 * - be cleared regularily 51 * - be cleared regularly
52 * - often being queried whether a peer is contained 52 * - often being queried whether a peer is contained
53 * - alter indices of peers 53 * - alter indices of peers
54 * - contain continous indices 0 <= i < len 54 * - contain continuous indices 0 <= i < len
55 * - not contain duplicate peers 55 * - not contain duplicate peers
56 */ 56 */
57struct CustomPeerMap 57struct CustomPeerMap
diff --git a/src/rps/rps-sampler_common.c b/src/rps/rps-sampler_common.c
index 488ed8e01..a30ba06a1 100644
--- a/src/rps/rps-sampler_common.c
+++ b/src/rps/rps-sampler_common.c
@@ -661,7 +661,7 @@ RPS_sampler_get_rand_peer_info (struct RPS_Sampler *sampler,
661 661
662 662
663/** 663/**
664 * Cancle a request issued through #RPS_sampler_n_rand_peers_ready_cb. 664 * Cancel a request issued through #RPS_sampler_n_rand_peers_ready_cb.
665 * 665 *
666 * @param req_handle the handle to the request 666 * @param req_handle the handle to the request
667 */ 667 */
@@ -699,7 +699,7 @@ RPS_sampler_request_cancel (struct RPS_SamplerRequestHandle *req_handle)
699 699
700 700
701/** 701/**
702 * Cancle a request issued through #RPS_sampler_sinlge_info_ready_cb. 702 * Cancel a request issued through #RPS_sampler_sinlge_info_ready_cb.
703 * 703 *
704 * @param req_handle the handle to the request 704 * @param req_handle the handle to the request
705 */ 705 */
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c
index 6dee20c95..8fd82f7b3 100644
--- a/src/rps/rps-test_util.c
+++ b/src/rps/rps-test_util.c
@@ -20,7 +20,7 @@
20 20
21/** 21/**
22 * @file rps/rps-test_util.c 22 * @file rps/rps-test_util.c
23 * @brief Some utils faciliating the view into the internals for the sampler 23 * @brief Some utils facilitating the view into the internals for the sampler
24 * needed for evaluation 24 * needed for evaluation
25 * 25 *
26 * @author Julius Bünger 26 * @author Julius Bünger
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index 8b69dae96..bb4c3597e 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -714,7 +714,7 @@ reconnect (struct GNUNET_RPS_Handle *h);
714/** 714/**
715 * Error handler for mq. 715 * Error handler for mq.
716 * 716 *
717 * This function is called whan mq encounters an error. 717 * This function is called when mq encounters an error.
718 * Until now mq doesn't provide useful error messages. 718 * Until now mq doesn't provide useful error messages.
719 * 719 *
720 * @param cls the closure 720 * @param cls the closure
@@ -1192,9 +1192,9 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
1192 1192
1193 1193
1194/** 1194/**
1195 * Cancle an issued request. 1195 * Cancel an issued request.
1196 * 1196 *
1197 * @param rh request handle of request to cancle 1197 * @param rh request handle of request to cancel
1198 */ 1198 */
1199void 1199void
1200GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh) 1200GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh)
@@ -1223,9 +1223,9 @@ GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh)
1223 1223
1224 1224
1225/** 1225/**
1226 * Cancle an issued single info request. 1226 * Cancel an issued single info request.
1227 * 1227 *
1228 * @param rhs request handle of request to cancle 1228 * @param rhs request handle of request to cancel
1229 */ 1229 */
1230void 1230void
1231GNUNET_RPS_request_single_info_cancel ( 1231GNUNET_RPS_request_single_info_cancel (
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index de09b423f..ab132ec8a 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -1957,7 +1957,7 @@ profiler_cb (struct RPSPeer *rps_peer)
1957 } 1957 }
1958 1958
1959 /* Only request peer ids at one peer. 1959 /* Only request peer ids at one peer.
1960 * (It's the before-last because last one is target of the focussed attack.) 1960 * (It's the before-last because last one is target of the focused attack.)
1961 */ 1961 */
1962 if (eval_peer == rps_peer) 1962 if (eval_peer == rps_peer)
1963 schedule_missing_requests (rps_peer); 1963 schedule_missing_requests (rps_peer);
@@ -2306,7 +2306,7 @@ void
2306compute_diversity () 2306compute_diversity ()
2307{ 2307{
2308 uint32_t i; 2308 uint32_t i;
2309 /* ith entry represents the numer of occurrences in other peer's views */ 2309 /* ith entry represents the number of occurrences in other peer's views */
2310 uint32_t *count_peers = GNUNET_new_array (num_peers, uint32_t); 2310 uint32_t *count_peers = GNUNET_new_array (num_peers, uint32_t);
2311 uint32_t views_total_size; 2311 uint32_t views_total_size;
2312 double expected; 2312 double expected;
@@ -2596,8 +2596,8 @@ stat_str_2_type (const char *stat_str)
2596 { 2596 {
2597 return STAT_TYPE_SENT_PULL_REQ; 2597 return STAT_TYPE_SENT_PULL_REQ;
2598 } 2598 }
2599 else if (0 == strncmp ("# pull replys sent", stat_str, strlen ( 2599 else if (0 == strncmp ("# pull replies sent", stat_str, strlen (
2600 "# pull replys sent"))) 2600 "# pull replies sent")))
2601 { 2601 {
2602 return STAT_TYPE_SENT_PULL_REP; 2602 return STAT_TYPE_SENT_PULL_REP;
2603 } 2603 }
@@ -2670,7 +2670,7 @@ stat_type_2_str (enum STAT_TYPE stat_type)
2670 return "# pull requests sent"; 2670 return "# pull requests sent";
2671 2671
2672 case STAT_TYPE_SENT_PULL_REP: 2672 case STAT_TYPE_SENT_PULL_REP:
2673 return "# pull replys sent"; 2673 return "# pull replies sent";
2674 2674
2675 case STAT_TYPE_RECV_PUSH_SEND: 2675 case STAT_TYPE_RECV_PUSH_SEND:
2676 return "# push message received"; 2676 return "# push message received";