aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-18 15:53:30 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-18 15:53:30 -0500
commit26e789fbfd4e5a7e2789c1577e8eb967de3eba86 (patch)
tree348d58b6bc8b8ae33ea9a5b7e8b0f755586bc534 /src/or/rephist.c
parentd1b40cf2e7bb55d3c421e6eff476330e08ab4750 (diff)
downloadtor-26e789fbfd4e5a7e2789c1577e8eb967de3eba86.tar.gz
tor-26e789fbfd4e5a7e2789c1577e8eb967de3eba86.zip
Rename nonconformant identifiers.
Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 4129fe2bbd..3d5000ccf8 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -930,7 +930,7 @@ rep_hist_get_router_stability_doc(time_t now)
return NULL;
tor_free(last_stability_doc);
- chunks = smartlist_create();
+ chunks = smartlist_new();
if (rep_hist_have_measured_enough_stability()) {
smartlist_add(chunks, tor_strdup("we-have-enough-measurements\n"));
@@ -1061,7 +1061,7 @@ rep_hist_load_mtbf_data(time_t now)
tor_free(filename);
if (!d)
return -1;
- lines = smartlist_create();
+ lines = smartlist_new();
smartlist_split_string(lines, d, "\n", SPLIT_SKIP_SPACE, 0);
tor_free(d);
}
@@ -1609,15 +1609,15 @@ rep_hist_update_bwhist_state_section(or_state_t *state,
}
*s_begins = 0;
*s_interval = 900;
- *s_values = smartlist_create();
- *s_maxima = smartlist_create();
+ *s_values = smartlist_new();
+ *s_maxima = smartlist_new();
return;
}
*s_begins = b->next_period;
*s_interval = NUM_SECS_BW_SUM_INTERVAL;
- *s_values = smartlist_create();
- *s_maxima = smartlist_create();
+ *s_values = smartlist_new();
+ *s_maxima = smartlist_new();
/* Set i to first position in circular array */
i = (b->num_maxes_set <= b->next_max_idx) ? 0 : b->next_max_idx;
for (j=0; j < b->num_maxes_set; ++j,++i) {
@@ -1801,7 +1801,7 @@ add_predicted_port(time_t now, uint16_t port)
static void
predicted_ports_init(void)
{
- predicted_ports_list = smartlist_create();
+ predicted_ports_list = smartlist_new();
add_predicted_port(time(NULL), 80); /* add one to kickstart us */
}
@@ -1850,7 +1850,7 @@ rep_hist_note_used_port(time_t now, uint16_t port)
smartlist_t *
rep_hist_get_predicted_ports(time_t now)
{
- smartlist_t *out = smartlist_create();
+ smartlist_t *out = smartlist_new();
tor_assert(predicted_ports_list);
/* clean out obsolete entries */
@@ -2184,9 +2184,9 @@ rep_hist_format_exit_stats(time_t now)
}
/* Add observations of top ports to smartlists. */
- written_strings = smartlist_create();
- read_strings = smartlist_create();
- streams_strings = smartlist_create();
+ written_strings = smartlist_new();
+ read_strings = smartlist_new();
+ streams_strings = smartlist_new();
other_read = total_read;
other_written = total_written;
other_streams = total_streams;
@@ -2370,7 +2370,7 @@ rep_hist_add_buffer_stats(double mean_num_cells_in_queue,
stat->mean_time_cells_in_queue = mean_time_cells_in_queue;
stat->processed_cells = processed_cells;
if (!circuits_for_buffer_stats)
- circuits_for_buffer_stats = smartlist_create();
+ circuits_for_buffer_stats = smartlist_new();
smartlist_add(circuits_for_buffer_stats, stat);
}
@@ -2439,7 +2439,7 @@ void
rep_hist_reset_buffer_stats(time_t now)
{
if (!circuits_for_buffer_stats)
- circuits_for_buffer_stats = smartlist_create();
+ circuits_for_buffer_stats = smartlist_new();
SMARTLIST_FOREACH(circuits_for_buffer_stats, circ_buffer_stats_t *,
stat, tor_free(stat));
smartlist_clear(circuits_for_buffer_stats);
@@ -2474,7 +2474,7 @@ rep_hist_format_buffer_stats(time_t now)
memset(queued_cells, 0, SHARES * sizeof(double));
memset(time_in_queue, 0, SHARES * sizeof(double));
if (!circuits_for_buffer_stats)
- circuits_for_buffer_stats = smartlist_create();
+ circuits_for_buffer_stats = smartlist_new();
number_of_circuits = smartlist_len(circuits_for_buffer_stats);
if (number_of_circuits > 0) {
smartlist_sort(circuits_for_buffer_stats,
@@ -2493,9 +2493,9 @@ rep_hist_format_buffer_stats(time_t now)
}
/* Write deciles to strings. */
- processed_cells_strings = smartlist_create();
- queued_cells_strings = smartlist_create();
- time_in_queue_strings = smartlist_create();
+ processed_cells_strings = smartlist_new();
+ queued_cells_strings = smartlist_new();
+ time_in_queue_strings = smartlist_new();
for (i = 0; i < SHARES; i++) {
smartlist_add_asprintf(processed_cells_strings,
"%d", !circs_in_share[i] ? 0 :