]>
git.ipfire.org Git - thirdparty/tor.git/log
Andrea Shepard [Wed, 17 Oct 2012 10:23:35 +0000 (03:23 -0700)]
Fix mal-merge, don't | END_CIRC_REASON_CHANNEL_CLOSED into reason codes in circuit_truncated()
Andrea Shepard [Mon, 15 Oct 2012 20:04:55 +0000 (13:04 -0700)]
Merge branch 'bug7087_2' of ssh://git-rw.torproject.org/user/andrea/tor
Nick Mathewson [Mon, 15 Oct 2012 19:59:52 +0000 (15:59 -0400)]
Fix a reserved identifier that my scripts missed
My scripts missed it because it was in eventdns.c, which was in ext,
but it _was_ using one of our identifiers. That's probably because
eventdns.c has drifted a bit since we forked it.
I'm not going to fix the other reserved identifiers in eventdns.c,
since that would make it drift even more.
Andrea Shepard [Mon, 15 Oct 2012 18:37:14 +0000 (11:37 -0700)]
Close and free channel_tls_listener correctly in channel_tls_free_all()
Nick Mathewson [Mon, 15 Oct 2012 15:22:53 +0000 (11:22 -0400)]
whitesapce fix
Nick Mathewson [Mon, 15 Oct 2012 15:20:48 +0000 (11:20 -0400)]
Merge remote-tracking branch 'public/bug1031'
Andrea Shepard [Mon, 15 Oct 2012 14:56:35 +0000 (07:56 -0700)]
Add debug logging to channel_listener_free()/channel_listener_force_free()
Nick Mathewson [Mon, 15 Oct 2012 14:55:52 +0000 (10:55 -0400)]
Fix a long line
Markus Teich [Mon, 15 Oct 2012 12:44:44 +0000 (14:44 +0200)]
fixed differing returntype in definition and declaration of dirserv_add_extrainfo
Andrea Shepard [Mon, 15 Oct 2012 14:22:33 +0000 (07:22 -0700)]
Merge branch 'bug7087' of git://git.torproject.org/user/andrea/tor
Andrea Shepard [Mon, 15 Oct 2012 13:46:23 +0000 (06:46 -0700)]
Add debug logging for channel_free() and channel_force_free()
Andrea Shepard [Mon, 15 Oct 2012 13:32:44 +0000 (06:32 -0700)]
Correctly clear cmux policies and free cmux in channel_free() and channel_force_free()
Nick Mathewson [Mon, 15 Oct 2012 03:06:43 +0000 (23:06 -0400)]
Merge remote-tracking branch 'arma/bug7029'
Roger Dingledine [Sat, 13 Oct 2012 22:34:24 +0000 (18:34 -0400)]
fix trivial typo
Nick Mathewson [Fri, 12 Oct 2012 23:48:26 +0000 (19:48 -0400)]
typo in src/ext/README; caught by rransom (thanks!)
Nick Mathewson [Fri, 12 Oct 2012 21:17:36 +0000 (17:17 -0400)]
Fix whitespace in aes.c
Nick Mathewson [Fri, 12 Oct 2012 21:16:20 +0000 (17:16 -0400)]
Simplify list of files that get whitespace-checked
The rule is simple: Everything not in src/ext!
Nick Mathewson [Fri, 12 Oct 2012 21:09:33 +0000 (17:09 -0400)]
Move strlcpy and strlcat into src/ext too
Nick Mathewson [Fri, 12 Oct 2012 21:00:35 +0000 (17:00 -0400)]
Distribute src/ext/README.
Nick Mathewson [Fri, 12 Oct 2012 21:00:01 +0000 (17:00 -0400)]
Add a README file for the src/ext directory.
Nick Mathewson [Fri, 12 Oct 2012 16:28:47 +0000 (12:28 -0400)]
Changes file for bug 1031 (reserved C identifiers)
Nick Mathewson [Fri, 12 Oct 2012 16:22:13 +0000 (12:22 -0400)]
Rename all reserved C identifiers we defined
For everything we declare that starts with _, make it end with _ instead.
This is a machine-generated patch. To make it, start by getting the
list of reserved identifiers using:
git ls-tree -r --name-only HEAD | grep '\.[ch]$' | \
xargs ctags --c-kinds=defglmpstuvx -o - | grep '^_' | \
cut -f 1 | sort| uniq
You might need gnu ctags.
Then pipe the output through this script:
==============================
use strict;
BEGIN { print "#!/usr/bin/perl -w -i -p\n\n"; }
chomp;
next if (
/^__attribute__/ or
/^__func__/ or
/^_FILE_OFFSET_BITS/ or
/^_FORTIFY_SOURCE/ or
/^_GNU_SOURCE/ or
/^_WIN32/ or
/^_DARWIN_UNLIMITED/ or
/^_FILE_OFFSET_BITS/ or
/^_LARGEFILE64_SOURCE/ or
/^_LFS64_LARGEFILE/ or
/^__cdecl/ or
/^__attribute__/ or
/^__func__/ or
/^_WIN32_WINNT/);
my $ident = $_;
my $better = $ident;
$better =~ s/^_//;
$better = "${better}_";
print "s/(?<![A-Za-z0-9_])$ident(?![A-Za-z0-9_])/$better/g;\n";
==============================
Then run the resulting script on all the files you want to change.
(That is, all the C except that in src/ext.) The resulting script was:
==============================
s/(?<![A-Za-z0-9_])_address(?![A-Za-z0-9_])/address_/g;
s/(?<![A-Za-z0-9_])_aes_fill_buf(?![A-Za-z0-9_])/aes_fill_buf_/g;
s/(?<![A-Za-z0-9_])_AllowInvalid(?![A-Za-z0-9_])/AllowInvalid_/g;
s/(?<![A-Za-z0-9_])_AP_CONN_STATE_MAX(?![A-Za-z0-9_])/AP_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_AP_CONN_STATE_MIN(?![A-Za-z0-9_])/AP_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_assert_cache_ok(?![A-Za-z0-9_])/assert_cache_ok_/g;
s/(?<![A-Za-z0-9_])_A_UNKNOWN(?![A-Za-z0-9_])/A_UNKNOWN_/g;
s/(?<![A-Za-z0-9_])_base(?![A-Za-z0-9_])/base_/g;
s/(?<![A-Za-z0-9_])_BridgePassword_AuthDigest(?![A-Za-z0-9_])/BridgePassword_AuthDigest_/g;
s/(?<![A-Za-z0-9_])_buffer_stats_compare_entries(?![A-Za-z0-9_])/buffer_stats_compare_entries_/g;
s/(?<![A-Za-z0-9_])_chan_circid_entries_eq(?![A-Za-z0-9_])/chan_circid_entries_eq_/g;
s/(?<![A-Za-z0-9_])_chan_circid_entry_hash(?![A-Za-z0-9_])/chan_circid_entry_hash_/g;
s/(?<![A-Za-z0-9_])_check_no_tls_errors(?![A-Za-z0-9_])/check_no_tls_errors_/g;
s/(?<![A-Za-z0-9_])_c_hist_compare(?![A-Za-z0-9_])/c_hist_compare_/g;
s/(?<![A-Za-z0-9_])_circ(?![A-Za-z0-9_])/circ_/g;
s/(?<![A-Za-z0-9_])_circuit_get_global_list(?![A-Za-z0-9_])/circuit_get_global_list_/g;
s/(?<![A-Za-z0-9_])_circuit_mark_for_close(?![A-Za-z0-9_])/circuit_mark_for_close_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_C_MAX(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_C_MAX_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_MAX(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_MAX_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_MIN(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_MIN_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_OR_MAX(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_OR_MAX_/g;
s/(?<![A-Za-z0-9_])_CIRCUIT_PURPOSE_OR_MIN(?![A-Za-z0-9_])/CIRCUIT_PURPOSE_OR_MIN_/g;
s/(?<![A-Za-z0-9_])_cmp_int_strings(?![A-Za-z0-9_])/cmp_int_strings_/g;
s/(?<![A-Za-z0-9_])_compare_cached_resolves_by_expiry(?![A-Za-z0-9_])/compare_cached_resolves_by_expiry_/g;
s/(?<![A-Za-z0-9_])_compare_digests(?![A-Za-z0-9_])/compare_digests_/g;
s/(?<![A-Za-z0-9_])_compare_digests256(?![A-Za-z0-9_])/compare_digests256_/g;
s/(?<![A-Za-z0-9_])_compare_dir_src_ents_by_authority_id(?![A-Za-z0-9_])/compare_dir_src_ents_by_authority_id_/g;
s/(?<![A-Za-z0-9_])_compare_duration_idx(?![A-Za-z0-9_])/compare_duration_idx_/g;
s/(?<![A-Za-z0-9_])_compare_int(?![A-Za-z0-9_])/compare_int_/g;
s/(?<![A-Za-z0-9_])_compare_networkstatus_v2_published_on(?![A-Za-z0-9_])/compare_networkstatus_v2_published_on_/g;
s/(?<![A-Za-z0-9_])_compare_old_routers_by_identity(?![A-Za-z0-9_])/compare_old_routers_by_identity_/g;
s/(?<![A-Za-z0-9_])_compare_orports(?![A-Za-z0-9_])/compare_orports_/g;
s/(?<![A-Za-z0-9_])_compare_pairs(?![A-Za-z0-9_])/compare_pairs_/g;
s/(?<![A-Za-z0-9_])_compare_routerinfo_by_id_digest(?![A-Za-z0-9_])/compare_routerinfo_by_id_digest_/g;
s/(?<![A-Za-z0-9_])_compare_routerinfo_by_ip_and_bw(?![A-Za-z0-9_])/compare_routerinfo_by_ip_and_bw_/g;
s/(?<![A-Za-z0-9_])_compare_signed_descriptors_by_age(?![A-Za-z0-9_])/compare_signed_descriptors_by_age_/g;
s/(?<![A-Za-z0-9_])_compare_string_ptrs(?![A-Za-z0-9_])/compare_string_ptrs_/g;
s/(?<![A-Za-z0-9_])_compare_strings_for_pqueue(?![A-Za-z0-9_])/compare_strings_for_pqueue_/g;
s/(?<![A-Za-z0-9_])_compare_strs(?![A-Za-z0-9_])/compare_strs_/g;
s/(?<![A-Za-z0-9_])_compare_tor_version_str_ptr(?![A-Za-z0-9_])/compare_tor_version_str_ptr_/g;
s/(?<![A-Za-z0-9_])_compare_vote_rs(?![A-Za-z0-9_])/compare_vote_rs_/g;
s/(?<![A-Za-z0-9_])_compare_votes_by_authority_id(?![A-Za-z0-9_])/compare_votes_by_authority_id_/g;
s/(?<![A-Za-z0-9_])_compare_without_first_ch(?![A-Za-z0-9_])/compare_without_first_ch_/g;
s/(?<![A-Za-z0-9_])_connection_free(?![A-Za-z0-9_])/connection_free_/g;
s/(?<![A-Za-z0-9_])_connection_mark_and_flush(?![A-Za-z0-9_])/connection_mark_and_flush_/g;
s/(?<![A-Za-z0-9_])_connection_mark_for_close(?![A-Za-z0-9_])/connection_mark_for_close_/g;
s/(?<![A-Za-z0-9_])_connection_mark_unattached_ap(?![A-Za-z0-9_])/connection_mark_unattached_ap_/g;
s/(?<![A-Za-z0-9_])_connection_write_to_buf_impl(?![A-Za-z0-9_])/connection_write_to_buf_impl_/g;
s/(?<![A-Za-z0-9_])_ConnLimit(?![A-Za-z0-9_])/ConnLimit_/g;
s/(?<![A-Za-z0-9_])_CONN_TYPE_MAX(?![A-Za-z0-9_])/CONN_TYPE_MAX_/g;
s/(?<![A-Za-z0-9_])_CONN_TYPE_MIN(?![A-Za-z0-9_])/CONN_TYPE_MIN_/g;
s/(?<![A-Za-z0-9_])_CONTROL_CONN_STATE_MAX(?![A-Za-z0-9_])/CONTROL_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_CONTROL_CONN_STATE_MIN(?![A-Za-z0-9_])/CONTROL_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_CPUWORKER_STATE_MAX(?![A-Za-z0-9_])/CPUWORKER_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_CPUWORKER_STATE_MIN(?![A-Za-z0-9_])/CPUWORKER_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_crypto_dh_get_dh(?![A-Za-z0-9_])/crypto_dh_get_dh_/g;
s/(?<![A-Za-z0-9_])_crypto_global_initialized(?![A-Za-z0-9_])/crypto_global_initialized_/g;
s/(?<![A-Za-z0-9_])_crypto_new_pk_from_rsa(?![A-Za-z0-9_])/crypto_new_pk_from_rsa_/g;
s/(?<![A-Za-z0-9_])_crypto_pk_get_evp_pkey(?![A-Za-z0-9_])/crypto_pk_get_evp_pkey_/g;
s/(?<![A-Za-z0-9_])_crypto_pk_get_rsa(?![A-Za-z0-9_])/crypto_pk_get_rsa_/g;
s/(?<![A-Za-z0-9_])_DIR_CONN_STATE_MAX(?![A-Za-z0-9_])/DIR_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_DIR_CONN_STATE_MIN(?![A-Za-z0-9_])/DIR_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_DIR_PURPOSE_MAX(?![A-Za-z0-9_])/DIR_PURPOSE_MAX_/g;
s/(?<![A-Za-z0-9_])_DIR_PURPOSE_MIN(?![A-Za-z0-9_])/DIR_PURPOSE_MIN_/g;
s/(?<![A-Za-z0-9_])_dirreq_map_get(?![A-Za-z0-9_])/dirreq_map_get_/g;
s/(?<![A-Za-z0-9_])_dirreq_map_put(?![A-Za-z0-9_])/dirreq_map_put_/g;
s/(?<![A-Za-z0-9_])_dns_randfn(?![A-Za-z0-9_])/dns_randfn_/g;
s/(?<![A-Za-z0-9_])_dummy(?![A-Za-z0-9_])/dummy_/g;
s/(?<![A-Za-z0-9_])_edge(?![A-Za-z0-9_])/edge_/g;
s/(?<![A-Za-z0-9_])_END_CIRC_REASON_MAX(?![A-Za-z0-9_])/END_CIRC_REASON_MAX_/g;
s/(?<![A-Za-z0-9_])_END_CIRC_REASON_MIN(?![A-Za-z0-9_])/END_CIRC_REASON_MIN_/g;
s/(?<![A-Za-z0-9_])_EOF(?![A-Za-z0-9_])/EOF_/g;
s/(?<![A-Za-z0-9_])_ERR(?![A-Za-z0-9_])/ERR_/g;
s/(?<![A-Za-z0-9_])_escaped_val(?![A-Za-z0-9_])/escaped_val_/g;
s/(?<![A-Za-z0-9_])_evdns_log(?![A-Za-z0-9_])/evdns_log_/g;
s/(?<![A-Za-z0-9_])_evdns_nameserver_add_impl(?![A-Za-z0-9_])/evdns_nameserver_add_impl_/g;
s/(?<![A-Za-z0-9_])_EVENT_MAX(?![A-Za-z0-9_])/EVENT_MAX_/g;
s/(?<![A-Za-z0-9_])_EVENT_MIN(?![A-Za-z0-9_])/EVENT_MIN_/g;
s/(?<![A-Za-z0-9_])_ExcludeExitNodesUnion(?![A-Za-z0-9_])/ExcludeExitNodesUnion_/g;
s/(?<![A-Za-z0-9_])_EXIT_CONN_STATE_MAX(?![A-Za-z0-9_])/EXIT_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_EXIT_CONN_STATE_MIN(?![A-Za-z0-9_])/EXIT_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_EXIT_PURPOSE_MAX(?![A-Za-z0-9_])/EXIT_PURPOSE_MAX_/g;
s/(?<![A-Za-z0-9_])_EXIT_PURPOSE_MIN(?![A-Za-z0-9_])/EXIT_PURPOSE_MIN_/g;
s/(?<![A-Za-z0-9_])_extrainfo_free(?![A-Za-z0-9_])/extrainfo_free_/g;
s/(?<![A-Za-z0-9_])_find_by_keyword(?![A-Za-z0-9_])/find_by_keyword_/g;
s/(?<![A-Za-z0-9_])_free_cached_dir(?![A-Za-z0-9_])/free_cached_dir_/g;
s/(?<![A-Za-z0-9_])_free_cached_resolve(?![A-Za-z0-9_])/free_cached_resolve_/g;
s/(?<![A-Za-z0-9_])_free_duplicate_routerstatus_entry(?![A-Za-z0-9_])/free_duplicate_routerstatus_entry_/g;
s/(?<![A-Za-z0-9_])_free_link_history(?![A-Za-z0-9_])/free_link_history_/g;
s/(?<![A-Za-z0-9_])_geoip_compare_entries(?![A-Za-z0-9_])/geoip_compare_entries_/g;
s/(?<![A-Za-z0-9_])_geoip_compare_key_to_entry(?![A-Za-z0-9_])/geoip_compare_key_to_entry_/g;
s/(?<![A-Za-z0-9_])_hex_decode_digit(?![A-Za-z0-9_])/hex_decode_digit_/g;
s/(?<![A-Za-z0-9_])_idxplus1(?![A-Za-z0-9_])/idxplus1_/g;
s/(?<![A-Za-z0-9_])__libc_enable_secure(?![A-Za-z0-9_])/_libc_enable_secure_/g;
s/(?<![A-Za-z0-9_])_log_debug(?![A-Za-z0-9_])/log_debug_/g;
s/(?<![A-Za-z0-9_])_log_err(?![A-Za-z0-9_])/log_err_/g;
s/(?<![A-Za-z0-9_])_log_fn(?![A-Za-z0-9_])/log_fn_/g;
s/(?<![A-Za-z0-9_])_log_fn_function_name(?![A-Za-z0-9_])/log_fn_function_name_/g;
s/(?<![A-Za-z0-9_])_log_global_min_severity(?![A-Za-z0-9_])/log_global_min_severity_/g;
s/(?<![A-Za-z0-9_])_log_info(?![A-Za-z0-9_])/log_info_/g;
s/(?<![A-Za-z0-9_])_log_notice(?![A-Za-z0-9_])/log_notice_/g;
s/(?<![A-Za-z0-9_])_log_prefix(?![A-Za-z0-9_])/log_prefix_/g;
s/(?<![A-Za-z0-9_])_log_warn(?![A-Za-z0-9_])/log_warn_/g;
s/(?<![A-Za-z0-9_])_magic(?![A-Za-z0-9_])/magic_/g;
s/(?<![A-Za-z0-9_])_MALLOC_LOCK(?![A-Za-z0-9_])/MALLOC_LOCK_/g;
s/(?<![A-Za-z0-9_])_MALLOC_LOCK_INIT(?![A-Za-z0-9_])/MALLOC_LOCK_INIT_/g;
s/(?<![A-Za-z0-9_])_MALLOC_UNLOCK(?![A-Za-z0-9_])/MALLOC_UNLOCK_/g;
s/(?<![A-Za-z0-9_])_microdesc_eq(?![A-Za-z0-9_])/microdesc_eq_/g;
s/(?<![A-Za-z0-9_])_microdesc_hash(?![A-Za-z0-9_])/microdesc_hash_/g;
s/(?<![A-Za-z0-9_])_MIN_TOR_TLS_ERROR_VAL(?![A-Za-z0-9_])/MIN_TOR_TLS_ERROR_VAL_/g;
s/(?<![A-Za-z0-9_])_mm_free(?![A-Za-z0-9_])/mm_free_/g;
s/(?<![A-Za-z0-9_])_NIL(?![A-Za-z0-9_])/NIL_/g;
s/(?<![A-Za-z0-9_])_n_openssl_mutexes(?![A-Za-z0-9_])/n_openssl_mutexes_/g;
s/(?<![A-Za-z0-9_])_openssl_dynlock_create_cb(?![A-Za-z0-9_])/openssl_dynlock_create_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_dynlock_destroy_cb(?![A-Za-z0-9_])/openssl_dynlock_destroy_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_dynlock_lock_cb(?![A-Za-z0-9_])/openssl_dynlock_lock_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_locking_cb(?![A-Za-z0-9_])/openssl_locking_cb_/g;
s/(?<![A-Za-z0-9_])_openssl_mutexes(?![A-Za-z0-9_])/openssl_mutexes_/g;
s/(?<![A-Za-z0-9_])_option_abbrevs(?![A-Za-z0-9_])/option_abbrevs_/g;
s/(?<![A-Za-z0-9_])_option_vars(?![A-Za-z0-9_])/option_vars_/g;
s/(?<![A-Za-z0-9_])_OR_CONN_STATE_MAX(?![A-Za-z0-9_])/OR_CONN_STATE_MAX_/g;
s/(?<![A-Za-z0-9_])_OR_CONN_STATE_MIN(?![A-Za-z0-9_])/OR_CONN_STATE_MIN_/g;
s/(?<![A-Za-z0-9_])_OutboundBindAddressIPv4(?![A-Za-z0-9_])/OutboundBindAddressIPv4_/g;
s/(?<![A-Za-z0-9_])_OutboundBindAddressIPv6(?![A-Za-z0-9_])/OutboundBindAddressIPv6_/g;
s/(?<![A-Za-z0-9_])_PDS_PREFER_TUNNELED_DIR_CONNS(?![A-Za-z0-9_])/PDS_PREFER_TUNNELED_DIR_CONNS_/g;
s/(?<![A-Za-z0-9_])_port(?![A-Za-z0-9_])/port_/g;
s/(?<![A-Za-z0-9_])__progname(?![A-Za-z0-9_])/_progname_/g;
s/(?<![A-Za-z0-9_])_PublishServerDescriptor(?![A-Za-z0-9_])/PublishServerDescriptor_/g;
s/(?<![A-Za-z0-9_])_remove_old_client_helper(?![A-Za-z0-9_])/remove_old_client_helper_/g;
s/(?<![A-Za-z0-9_])_rend_cache_entry_free(?![A-Za-z0-9_])/rend_cache_entry_free_/g;
s/(?<![A-Za-z0-9_])_routerlist_find_elt(?![A-Za-z0-9_])/routerlist_find_elt_/g;
s/(?<![A-Za-z0-9_])_SafeLogging(?![A-Za-z0-9_])/SafeLogging_/g;
s/(?<![A-Za-z0-9_])_SHORT_FILE_(?![A-Za-z0-9_])/SHORT_FILE__/g;
s/(?<![A-Za-z0-9_])_state_abbrevs(?![A-Za-z0-9_])/state_abbrevs_/g;
s/(?<![A-Za-z0-9_])_state_vars(?![A-Za-z0-9_])/state_vars_/g;
s/(?<![A-Za-z0-9_])_t(?![A-Za-z0-9_])/t_/g;
s/(?<![A-Za-z0-9_])_t32(?![A-Za-z0-9_])/t32_/g;
s/(?<![A-Za-z0-9_])_test_op_ip6(?![A-Za-z0-9_])/test_op_ip6_/g;
s/(?<![A-Za-z0-9_])_thread1_name(?![A-Za-z0-9_])/thread1_name_/g;
s/(?<![A-Za-z0-9_])_thread2_name(?![A-Za-z0-9_])/thread2_name_/g;
s/(?<![A-Za-z0-9_])_thread_test_func(?![A-Za-z0-9_])/thread_test_func_/g;
s/(?<![A-Za-z0-9_])_thread_test_mutex(?![A-Za-z0-9_])/thread_test_mutex_/g;
s/(?<![A-Za-z0-9_])_thread_test_start1(?![A-Za-z0-9_])/thread_test_start1_/g;
s/(?<![A-Za-z0-9_])_thread_test_start2(?![A-Za-z0-9_])/thread_test_start2_/g;
s/(?<![A-Za-z0-9_])_thread_test_strmap(?![A-Za-z0-9_])/thread_test_strmap_/g;
s/(?<![A-Za-z0-9_])_tor_calloc(?![A-Za-z0-9_])/tor_calloc_/g;
s/(?<![A-Za-z0-9_])_TOR_CHANNEL_INTERNAL(?![A-Za-z0-9_])/TOR_CHANNEL_INTERNAL_/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITMUX_EWMA_C(?![A-Za-z0-9_])/TOR_CIRCUITMUX_EWMA_C_/g;
s/(?<![A-Za-z0-9_])_tor_free(?![A-Za-z0-9_])/tor_free_/g;
s/(?<![A-Za-z0-9_])_tor_malloc(?![A-Za-z0-9_])/tor_malloc_/g;
s/(?<![A-Za-z0-9_])_tor_malloc_zero(?![A-Za-z0-9_])/tor_malloc_zero_/g;
s/(?<![A-Za-z0-9_])_tor_memdup(?![A-Za-z0-9_])/tor_memdup_/g;
s/(?<![A-Za-z0-9_])_tor_realloc(?![A-Za-z0-9_])/tor_realloc_/g;
s/(?<![A-Za-z0-9_])_tor_strdup(?![A-Za-z0-9_])/tor_strdup_/g;
s/(?<![A-Za-z0-9_])_tor_strndup(?![A-Za-z0-9_])/tor_strndup_/g;
s/(?<![A-Za-z0-9_])_TOR_TLS_SYSCALL(?![A-Za-z0-9_])/TOR_TLS_SYSCALL_/g;
s/(?<![A-Za-z0-9_])_TOR_TLS_ZERORETURN(?![A-Za-z0-9_])/TOR_TLS_ZERORETURN_/g;
s/(?<![A-Za-z0-9_])__USE_ISOC99(?![A-Za-z0-9_])/_USE_ISOC99_/g;
s/(?<![A-Za-z0-9_])_UsingTestNetworkDefaults(?![A-Za-z0-9_])/UsingTestNetworkDefaults_/g;
s/(?<![A-Za-z0-9_])_val(?![A-Za-z0-9_])/val_/g;
s/(?<![A-Za-z0-9_])_void_for_alignment(?![A-Za-z0-9_])/void_for_alignment_/g;
==============================
Nick Mathewson [Fri, 12 Oct 2012 16:13:10 +0000 (12:13 -0400)]
Convert all include-guard macros to avoid reserved identifiers.
In C, we technically aren't supposed to define our own things that
start with an underscore.
This is a purely machine-generated commit. First, I ran this script
on all the headers in src/{common,or,test,tools/*}/*.h :
==============================
use strict;
my %macros = ();
my %skipped = ();
FILE: for my $fn (@ARGV) {
my $f = $fn;
if ($fn !~ /^\.\//) {
$f = "./$fn";
}
$skipped{$fn} = 0;
open(F, $fn);
while (<F>) {
if (/^#ifndef ([A-Za-z0-9_]+)/) {
$macros{$fn} = $1;
next FILE;
}
}
}
print "#!/usr/bin/perl -w -i -p\n\n";
for my $fn (@ARGV) {
if (! exists $macros{$fn}) {
print "# No macro known for $fn!\n" if (!$skipped{$fn});
next;
}
if ($macros{$fn} !~ /_H_?$/) {
print "# Weird macro for $fn...\n";
}
my $goodmacro = uc $fn;
$goodmacro =~ s#.*/##;
$goodmacro =~ s#[\/\-\.]#_#g;
print "s/(?<![A-Za-z0-9_])$macros{$fn}(?![A-Za-z0-9_])/TOR_${goodmacro}/g;\n"
}
==============================
It produced the following output, which I then re-ran on those same files:
==============================
s/(?<![A-Za-z0-9_])_TOR_ADDRESS_H(?![A-Za-z0-9_])/TOR_ADDRESS_H/g;
s/(?<![A-Za-z0-9_])_TOR_AES_H(?![A-Za-z0-9_])/TOR_AES_H/g;
s/(?<![A-Za-z0-9_])_TOR_COMPAT_H(?![A-Za-z0-9_])/TOR_COMPAT_H/g;
s/(?<![A-Za-z0-9_])_TOR_COMPAT_LIBEVENT_H(?![A-Za-z0-9_])/TOR_COMPAT_LIBEVENT_H/g;
s/(?<![A-Za-z0-9_])_TOR_CONTAINER_H(?![A-Za-z0-9_])/TOR_CONTAINER_H/g;
s/(?<![A-Za-z0-9_])_TOR_CRYPTO_H(?![A-Za-z0-9_])/TOR_CRYPTO_H/g;
s/(?<![A-Za-z0-9_])TOR_DI_OPS_H(?![A-Za-z0-9_])/TOR_DI_OPS_H/g;
s/(?<![A-Za-z0-9_])_TOR_MEMAREA_H(?![A-Za-z0-9_])/TOR_MEMAREA_H/g;
s/(?<![A-Za-z0-9_])_TOR_MEMPOOL_H(?![A-Za-z0-9_])/TOR_MEMPOOL_H/g;
s/(?<![A-Za-z0-9_])TOR_PROCMON_H(?![A-Za-z0-9_])/TOR_PROCMON_H/g;
s/(?<![A-Za-z0-9_])_TOR_TORGZIP_H(?![A-Za-z0-9_])/TOR_TORGZIP_H/g;
s/(?<![A-Za-z0-9_])_TOR_TORINT_H(?![A-Za-z0-9_])/TOR_TORINT_H/g;
s/(?<![A-Za-z0-9_])_TOR_LOG_H(?![A-Za-z0-9_])/TOR_TORLOG_H/g;
s/(?<![A-Za-z0-9_])_TOR_TORTLS_H(?![A-Za-z0-9_])/TOR_TORTLS_H/g;
s/(?<![A-Za-z0-9_])_TOR_UTIL_H(?![A-Za-z0-9_])/TOR_UTIL_H/g;
s/(?<![A-Za-z0-9_])_TOR_BUFFERS_H(?![A-Za-z0-9_])/TOR_BUFFERS_H/g;
s/(?<![A-Za-z0-9_])_TOR_CHANNEL_H(?![A-Za-z0-9_])/TOR_CHANNEL_H/g;
s/(?<![A-Za-z0-9_])_TOR_CHANNEL_TLS_H(?![A-Za-z0-9_])/TOR_CHANNELTLS_H/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITBUILD_H(?![A-Za-z0-9_])/TOR_CIRCUITBUILD_H/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITLIST_H(?![A-Za-z0-9_])/TOR_CIRCUITLIST_H/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITMUX_EWMA_H(?![A-Za-z0-9_])/TOR_CIRCUITMUX_EWMA_H/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITMUX_H(?![A-Za-z0-9_])/TOR_CIRCUITMUX_H/g;
s/(?<![A-Za-z0-9_])_TOR_CIRCUITUSE_H(?![A-Za-z0-9_])/TOR_CIRCUITUSE_H/g;
s/(?<![A-Za-z0-9_])_TOR_COMMAND_H(?![A-Za-z0-9_])/TOR_COMMAND_H/g;
s/(?<![A-Za-z0-9_])_TOR_CONFIG_H(?![A-Za-z0-9_])/TOR_CONFIG_H/g;
s/(?<![A-Za-z0-9_])TOR_CONFPARSE_H(?![A-Za-z0-9_])/TOR_CONFPARSE_H/g;
s/(?<![A-Za-z0-9_])_TOR_CONNECTION_EDGE_H(?![A-Za-z0-9_])/TOR_CONNECTION_EDGE_H/g;
s/(?<![A-Za-z0-9_])_TOR_CONNECTION_H(?![A-Za-z0-9_])/TOR_CONNECTION_H/g;
s/(?<![A-Za-z0-9_])_TOR_CONNECTION_OR_H(?![A-Za-z0-9_])/TOR_CONNECTION_OR_H/g;
s/(?<![A-Za-z0-9_])_TOR_CONTROL_H(?![A-Za-z0-9_])/TOR_CONTROL_H/g;
s/(?<![A-Za-z0-9_])_TOR_CPUWORKER_H(?![A-Za-z0-9_])/TOR_CPUWORKER_H/g;
s/(?<![A-Za-z0-9_])_TOR_DIRECTORY_H(?![A-Za-z0-9_])/TOR_DIRECTORY_H/g;
s/(?<![A-Za-z0-9_])_TOR_DIRSERV_H(?![A-Za-z0-9_])/TOR_DIRSERV_H/g;
s/(?<![A-Za-z0-9_])_TOR_DIRVOTE_H(?![A-Za-z0-9_])/TOR_DIRVOTE_H/g;
s/(?<![A-Za-z0-9_])_TOR_DNS_H(?![A-Za-z0-9_])/TOR_DNS_H/g;
s/(?<![A-Za-z0-9_])_TOR_DNSSERV_H(?![A-Za-z0-9_])/TOR_DNSSERV_H/g;
s/(?<![A-Za-z0-9_])TOR_EVENTDNS_TOR_H(?![A-Za-z0-9_])/TOR_EVENTDNS_TOR_H/g;
s/(?<![A-Za-z0-9_])_TOR_GEOIP_H(?![A-Za-z0-9_])/TOR_GEOIP_H/g;
s/(?<![A-Za-z0-9_])_TOR_HIBERNATE_H(?![A-Za-z0-9_])/TOR_HIBERNATE_H/g;
s/(?<![A-Za-z0-9_])_TOR_MAIN_H(?![A-Za-z0-9_])/TOR_MAIN_H/g;
s/(?<![A-Za-z0-9_])_TOR_MICRODESC_H(?![A-Za-z0-9_])/TOR_MICRODESC_H/g;
s/(?<![A-Za-z0-9_])_TOR_NETWORKSTATUS_H(?![A-Za-z0-9_])/TOR_NETWORKSTATUS_H/g;
s/(?<![A-Za-z0-9_])_TOR_NODELIST_H(?![A-Za-z0-9_])/TOR_NODELIST_H/g;
s/(?<![A-Za-z0-9_])_TOR_NTMAIN_H(?![A-Za-z0-9_])/TOR_NTMAIN_H/g;
s/(?<![A-Za-z0-9_])_TOR_ONION_H(?![A-Za-z0-9_])/TOR_ONION_H/g;
s/(?<![A-Za-z0-9_])_TOR_OR_H(?![A-Za-z0-9_])/TOR_OR_H/g;
s/(?<![A-Za-z0-9_])_TOR_POLICIES_H(?![A-Za-z0-9_])/TOR_POLICIES_H/g;
s/(?<![A-Za-z0-9_])_TOR_REASONS_H(?![A-Za-z0-9_])/TOR_REASONS_H/g;
s/(?<![A-Za-z0-9_])_TOR_RELAY_H(?![A-Za-z0-9_])/TOR_RELAY_H/g;
s/(?<![A-Za-z0-9_])_TOR_RENDCLIENT_H(?![A-Za-z0-9_])/TOR_RENDCLIENT_H/g;
s/(?<![A-Za-z0-9_])_TOR_RENDCOMMON_H(?![A-Za-z0-9_])/TOR_RENDCOMMON_H/g;
s/(?<![A-Za-z0-9_])_TOR_RENDMID_H(?![A-Za-z0-9_])/TOR_RENDMID_H/g;
s/(?<![A-Za-z0-9_])_TOR_RENDSERVICE_H(?![A-Za-z0-9_])/TOR_RENDSERVICE_H/g;
s/(?<![A-Za-z0-9_])_TOR_REPHIST_H(?![A-Za-z0-9_])/TOR_REPHIST_H/g;
s/(?<![A-Za-z0-9_])_TOR_REPLAYCACHE_H(?![A-Za-z0-9_])/TOR_REPLAYCACHE_H/g;
s/(?<![A-Za-z0-9_])_TOR_ROUTER_H(?![A-Za-z0-9_])/TOR_ROUTER_H/g;
s/(?<![A-Za-z0-9_])_TOR_ROUTERLIST_H(?![A-Za-z0-9_])/TOR_ROUTERLIST_H/g;
s/(?<![A-Za-z0-9_])_TOR_ROUTERPARSE_H(?![A-Za-z0-9_])/TOR_ROUTERPARSE_H/g;
s/(?<![A-Za-z0-9_])TOR_ROUTERSET_H(?![A-Za-z0-9_])/TOR_ROUTERSET_H/g;
s/(?<![A-Za-z0-9_])TOR_STATEFILE_H(?![A-Za-z0-9_])/TOR_STATEFILE_H/g;
s/(?<![A-Za-z0-9_])_TOR_STATUS_H(?![A-Za-z0-9_])/TOR_STATUS_H/g;
s/(?<![A-Za-z0-9_])TOR_TRANSPORTS_H(?![A-Za-z0-9_])/TOR_TRANSPORTS_H/g;
s/(?<![A-Za-z0-9_])_TOR_TEST_H(?![A-Za-z0-9_])/TOR_TEST_H/g;
s/(?<![A-Za-z0-9_])_TOR_FW_HELPER_H(?![A-Za-z0-9_])/TOR_TOR_FW_HELPER_H/g;
s/(?<![A-Za-z0-9_])_TOR_FW_HELPER_NATPMP_H(?![A-Za-z0-9_])/TOR_TOR_FW_HELPER_NATPMP_H/g;
s/(?<![A-Za-z0-9_])_TOR_FW_HELPER_UPNP_H(?![A-Za-z0-9_])/TOR_TOR_FW_HELPER_UPNP_H/g;
==============================
Nick Mathewson [Fri, 12 Oct 2012 16:11:54 +0000 (12:11 -0400)]
Clean up reserved identifier usage in src/ext include guards
Nick Mathewson [Fri, 12 Oct 2012 16:08:05 +0000 (12:08 -0400)]
Add guard macro for eventdns_tor.h
Nick Mathewson [Fri, 12 Oct 2012 15:34:54 +0000 (11:34 -0400)]
Make tor_addr_is_internal log the calling function on error
This might make it a little easier to track down bug 7086.
Andrea Shepard [Fri, 12 Oct 2012 07:45:31 +0000 (00:45 -0700)]
Install correct incoming cell handlers on reachability testing channels
Fix for bug 7086.
Andrea Shepard [Thu, 11 Oct 2012 22:55:26 +0000 (15:55 -0700)]
Merge branch 'move_contrib_source' of git://git.torproject.org/nickm/tor
Nick Mathewson [Thu, 11 Oct 2012 21:19:37 +0000 (17:19 -0400)]
Move all externally maintained source files into src/ext
The rationale for treating these files differently is that we should
be checking upstream for changes as applicable, and merging changes
upstream as warranted.
Nick Mathewson [Thu, 11 Oct 2012 04:35:58 +0000 (00:35 -0400)]
Make very sure to handle cells in-order on channels.
Fix on code for 6465, not yet in any release.
Nick Mathewson [Thu, 11 Oct 2012 02:31:06 +0000 (22:31 -0400)]
Merge branch 'bug7011'
Conflicts:
src/or/circuitbuild.c
The conflict was trivial, since no line of code actually changed in
both branches: There was a fmt_addr() that turned into fmt_addrport()
in bug7011, and a "if (!n_conn)" that turned into "if (!n_chan)" in
master.
Nick Mathewson [Thu, 11 Oct 2012 02:27:52 +0000 (22:27 -0400)]
Fix changes/bug7011 slightly
David Fifield [Thu, 11 Oct 2012 00:34:55 +0000 (17:34 -0700)]
Add changes file for bug7011.
David Fifield [Thu, 11 Oct 2012 00:08:07 +0000 (17:08 -0700)]
Use fmt_addrport in pt_get_extra_info_descriptor_string.
This patch is by asn.
https://trac.torproject.org/projects/tor/ticket/7011#comment:11
David Fifield [Sun, 7 Oct 2012 04:25:25 +0000 (21:25 -0700)]
Use fmt_addrport where appropriate.
This is mostly a conversion from this pattern:
log("... %s:%d ...", fmt_and_decorate_addr(&addr), port);
to this:
log("... %s ...", fmt_addrport(&addr, port));
The output is the same in all cases.
David Fifield [Fri, 5 Oct 2012 02:43:44 +0000 (19:43 -0700)]
Add fmt_addrport.
This function formats an addr:port pair, and always decorates IPv6
addresses.
David Fifield [Thu, 11 Oct 2012 00:11:03 +0000 (17:11 -0700)]
Use fmt_and_decorate_addr in extra-info "transport" lines.
Apparently BridgeDB is already expecting transport lines to be formatted
thus; see https://trac.torproject.org/projects/tor/ticket/7011#comment:12 ff.
It may be that there are no extant IPv6 pluggable transport bridges yet,
so this didn't cause a problem.
David Fifield [Sun, 7 Oct 2012 04:03:24 +0000 (21:03 -0700)]
Use fmt_and_decorate_addr in TransportProxy statefile entry.
state_transport_line_is_valid calls tor_addr_port_lookup, which expects
brackets around an IPv6 address. Without this, cached transport
addresses can't be parsed later:
[warn] state: Could not parse addrport.
[warn] state: State file seems to be broken.
See #7011.
David Fifield [Sun, 7 Oct 2012 03:40:18 +0000 (20:40 -0700)]
Decorate addresses given to a HTTP CONNECT proxy.
This affects the Request-URI and the value of the Host header. RFC 2616
doesn't directly address the formatting of IPv6 addresses, but it
delegates some productions to RFC 2396 "Uniform Resource Identifiers
(URI): Generic Syntax," which is obsoleted by RFC 3986, which requires
square brackets for IPv6 addresses in both places.
I tested this with
HTTPSProxy 127.0.0.1:8000
Bridge <IPv6 bridge>
UseBridges 1
and an Ncat HTTP proxy:
ncat --proxy-type http -l 8000 -vvv
https://tools.ietf.org/html/rfc2616#section-3.2.1
https://tools.ietf.org/html/rfc2616#section-5.1.2
https://tools.ietf.org/html/rfc2616#section-14.23
https://tools.ietf.org/html/rfc3986#section-3.2.2
David Fifield [Sun, 7 Oct 2012 03:30:58 +0000 (20:30 -0700)]
Use fmt_and_decorate_addr in log messages.
Andrea Shepard [Thu, 11 Oct 2012 01:53:38 +0000 (18:53 -0700)]
Merge branch 'bug6816_squashed_nowarn' of git://git.torproject.org/nickm/tor
Nick Mathewson [Thu, 11 Oct 2012 01:25:52 +0000 (21:25 -0400)]
Remove variables; fix gcc 4.7 warnings
My GCC warns when variables are assigned to but never used. There
were a few like that in the 6816/6465 branches.
Andrea Shepard [Wed, 10 Oct 2012 07:51:55 +0000 (00:51 -0700)]
Add changes file for bug6816
Andrea Shepard [Wed, 10 Oct 2012 07:48:36 +0000 (00:48 -0700)]
Fix formatting in various places after 6465/6816 work
Andrea Shepard [Wed, 10 Oct 2012 07:19:57 +0000 (00:19 -0700)]
Make channel_flush_some_cells() compile cleanly on machines with ssize_t larger than int per sjumrdoch comment
Andrea Shepard [Sat, 6 Oct 2012 12:45:24 +0000 (05:45 -0700)]
Don't remove circuitmux hash table entries in circuitmux_detach_circuit() until after circuitmux_make_circuit_inactive()
Andrea Shepard [Sat, 6 Oct 2012 04:57:42 +0000 (21:57 -0700)]
Fix 'warning: circuit was already inactive' and assert in circuitmux_make_circuit_inactive() during circuitmux_detach_all_circuits()
Andrea Shepard [Wed, 3 Oct 2012 03:08:30 +0000 (20:08 -0700)]
Bring summary comment block in circuitmux.c up to date
Andrea Shepard [Tue, 2 Oct 2012 04:03:38 +0000 (21:03 -0700)]
New and improved circuitmux_detach_all_circuits(), now without the stupid
Andrea Shepard [Tue, 2 Oct 2012 03:30:33 +0000 (20:30 -0700)]
Correctly set magic numbers on ewma policy data/circuit data when allocating
Andrea Shepard [Tue, 2 Oct 2012 03:27:51 +0000 (20:27 -0700)]
Set circuitmux policy on existing active channels when ewma_enabled changes
Andrea Shepard [Tue, 2 Oct 2012 03:27:01 +0000 (20:27 -0700)]
Set circuitmux policy on new channels in channeltls.c
Andrea Shepard [Tue, 2 Oct 2012 03:08:36 +0000 (20:08 -0700)]
Implement cell_ewma_enabled()
Andrea Shepard [Tue, 2 Oct 2012 03:05:03 +0000 (20:05 -0700)]
Implement channel_set_cmux_policy_everywhere()
Andrea Shepard [Tue, 2 Oct 2012 00:33:41 +0000 (17:33 -0700)]
Fix broken circuitmux_move_active_circ_to_tail(); don't assume n_chan is not NULL in circuitmux_detach_circuit()
Andrea Shepard [Mon, 1 Oct 2012 21:55:33 +0000 (14:55 -0700)]
Allow n_chan to be NULL in circuitmux_find_map_entry(); it can be but with non-NULL p_chan when extending a circuit
Andrea Shepard [Mon, 1 Oct 2012 21:25:52 +0000 (14:25 -0700)]
Use circuit_get_by_circid_channel_even_if_marked() and fix some asserts in circuitmux.c
Andrea Shepard [Mon, 1 Oct 2012 21:24:08 +0000 (14:24 -0700)]
Fix some circuitmux-related asserts in relay.c
Andrea Shepard [Mon, 1 Oct 2012 21:22:53 +0000 (14:22 -0700)]
Fix detach when setting circuit ID to 0 bug in circuit_set_circid_chan_helper() and add circuit_get_by_circid_channel_even_if_marked()
Andrea Shepard [Mon, 1 Oct 2012 21:22:04 +0000 (14:22 -0700)]
Detach circuits from circuitmux early when freeing channel so they can find the channel by ID
Andrea Shepard [Mon, 1 Oct 2012 20:06:10 +0000 (13:06 -0700)]
Handle closing circuits correctly with circuitmux_t
Andrea Shepard [Mon, 1 Oct 2012 19:01:05 +0000 (12:01 -0700)]
Add a bunch of paranoid-mode expensive asserts incircuitmux.c
Andrea Shepard [Mon, 1 Oct 2012 17:58:27 +0000 (10:58 -0700)]
Adjust the circuitmux_t counter correctly in circuitmux_notify_xmit_cells()
Andrea Shepard [Mon, 1 Oct 2012 17:39:40 +0000 (10:39 -0700)]
Fix circuitmux attach/detach logic in circuit_set_circid_chan_helper(); it's possible for id to be zero (not assigned yet) and shouldn't be attached then
Andrea Shepard [Mon, 1 Oct 2012 08:59:40 +0000 (01:59 -0700)]
Update circuitmux-related TODOs in channeltls.c
Andrea Shepard [Mon, 1 Oct 2012 08:58:13 +0000 (01:58 -0700)]
Fix comment on circuit_t.n_hop and remove circuitmux TODO in or.h
Andrea Shepard [Mon, 1 Oct 2012 08:54:42 +0000 (01:54 -0700)]
Move all EWMA code into circuitmux.c and implement circuitmux_policy_t methods using it
Andrea Shepard [Mon, 1 Oct 2012 08:53:59 +0000 (01:53 -0700)]
Add circuitmux.h, circuitmux_ewma.h includes now necessary in networkstatus.c
Andrea Shepard [Mon, 1 Oct 2012 08:53:24 +0000 (01:53 -0700)]
Remove cell_ewma_t from or.h and from circuit_t/or_circuit_t; all that goes to the new circuitmux_ewma.c now
Andrea Shepard [Mon, 1 Oct 2012 08:52:39 +0000 (01:52 -0700)]
Add circuitmux.h, circuitmux_ewma.h includes now necessary in config.c
Andrea Shepard [Mon, 1 Oct 2012 08:51:31 +0000 (01:51 -0700)]
Remove EWMA code from relay.{c,h}; it goes to a circuitmux policy now
Andrea Shepard [Mon, 1 Oct 2012 08:50:05 +0000 (01:50 -0700)]
Remove ewma setup code in init_circuit_base()/or_circuit_new() of circuitlist.c; it gets allocated when the circuit is attached to a circuitmux_t with that policy now
Andrea Shepard [Mon, 1 Oct 2012 08:48:52 +0000 (01:48 -0700)]
Add upcasts for circuitmux_policy_data_t and circuitmux_policy_circ_data_t to circuitmux.h
Andrea Shepard [Mon, 1 Oct 2012 04:41:25 +0000 (21:41 -0700)]
Add initial circuitmux_ewma.{c,h}
Andrea Shepard [Mon, 1 Oct 2012 04:24:04 +0000 (21:24 -0700)]
Implement circuitmux_assert_okay() and helper functions in circuitmux.c
Andrea Shepard [Fri, 28 Sep 2012 23:56:46 +0000 (16:56 -0700)]
Implement circuitmux_get_first_active_circuit() in circuitmux.c; add pick_active_circuit() to circuitmux_policy_t in circuitmux.h
Andrea Shepard [Thu, 27 Sep 2012 22:17:48 +0000 (15:17 -0700)]
Add comment for circuitmux_notify_xmit_cells() in circuitmux.c
Andrea Shepard [Thu, 27 Sep 2012 22:09:37 +0000 (15:09 -0700)]
Add comment for circuitmux_move_active_circ_to_tail() in circuitmux.c
Andrea Shepard [Thu, 27 Sep 2012 22:04:46 +0000 (15:04 -0700)]
Implement circuitmux_notify_xmit_cells() and circuitmux_move_active_circ_to_tail() helper in circuitmux.c
Andrea Shepard [Thu, 27 Sep 2012 20:51:04 +0000 (13:51 -0700)]
Consistently allow policy alloc_cmux_data() and alloc_circ_data() functions to return NULL if the policy does not use this in circuitmux.c
Andrea Shepard [Thu, 27 Sep 2012 20:42:47 +0000 (13:42 -0700)]
Implement circuitmux_clear_policy(), circuitmux_get_policy() and circuitmux_set_policy() in circuitmux.c
Andrea Shepard [Thu, 27 Sep 2012 19:20:05 +0000 (12:20 -0700)]
Add cmux policy notify_set_n_cells() and notify_xmit_cells() callbacks
Andrea Shepard [Thu, 27 Sep 2012 19:00:21 +0000 (12:00 -0700)]
Allocate and free circuit-specific policy data in the right places
Andrea Shepard [Thu, 27 Sep 2012 18:38:27 +0000 (11:38 -0700)]
Implement circuitmux policy basic notifications mechanism
Andrea Shepard [Wed, 26 Sep 2012 22:05:10 +0000 (15:05 -0700)]
Eliminate linked list helper functions in relay.c which are no longer used
Andrea Shepard [Wed, 26 Sep 2012 22:04:29 +0000 (15:04 -0700)]
Implement circuitmux_make_circuit_inactive(), circuitmux_make_circuit_active() and linked list helper functions in circuitmux.c
Andrea Shepard [Wed, 26 Sep 2012 20:38:32 +0000 (13:38 -0700)]
Implement circuitmux_detach_all_circuits() in circuitmux.c
Andrea Shepard [Wed, 26 Sep 2012 19:56:30 +0000 (12:56 -0700)]
Implement circuitmux_is_circuit_active(), circuitmux_num_cells_for_circuit(), circuitmux_num_cells(), circuitmux_num_active_circuits() and circuitmux_num_circuits() in circuitmux.c
Andrea Shepard [Wed, 26 Sep 2012 19:23:58 +0000 (12:23 -0700)]
Implement circuitmux_clear_num_cells() and circuitmux_set_num_cells() in circuitmux.c, remove unneeded circuitmux_add_to_num_cells() from circuitmux.h
Andrea Shepard [Wed, 26 Sep 2012 18:51:39 +0000 (11:51 -0700)]
Handle n_mux/p_mux properly in circuitmux.c
Andrea Shepard [Wed, 26 Sep 2012 18:40:33 +0000 (11:40 -0700)]
Implement circuitmux_detach_circuit() in circuitmux.c
Andrea Shepard [Wed, 26 Sep 2012 17:54:08 +0000 (10:54 -0700)]
Implement circuitmux_attached_circuit_direction(), circuitmux_find_map_entry() and circuitmux_is_circuit_attached() in circuitmux.c
Andrea Shepard [Wed, 26 Sep 2012 07:56:26 +0000 (00:56 -0700)]
Implement circuitmux_attach_circuit() in circuitmux.c
Andrea Shepard [Mon, 24 Sep 2012 15:52:05 +0000 (08:52 -0700)]
Implement circuitmux_alloc()/circuitmux_free() and chanid/circid->muxinfo hash table
Andrea Shepard [Fri, 21 Sep 2012 21:46:22 +0000 (14:46 -0700)]
Use circuitmux_t in channels and when relaying cells
Andrea Shepard [Fri, 21 Sep 2012 21:45:32 +0000 (14:45 -0700)]
Add circuitmux.c, circuitmux.h
Andrea Shepard [Tue, 9 Oct 2012 21:16:51 +0000 (14:16 -0700)]
Add magic number for type-checking channel casts
Andrea Shepard [Tue, 9 Oct 2012 18:38:15 +0000 (11:38 -0700)]
Improve comments on channel_write_*()
Andrea Shepard [Tue, 9 Oct 2012 18:35:08 +0000 (11:35 -0700)]
Use cell_queue_entry_new/free() functions in channel.c
Andrea Shepard [Tue, 9 Oct 2012 17:51:10 +0000 (10:51 -0700)]
Set reason_for_closing when erroring out of channel_tls_connect()