aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-12-05 19:19:24 +0200
committerNick Mathewson <nickm@torproject.org>2013-07-18 14:59:56 -0400
commitc46f1b810dab79514d650f44ccf21ca4d24a20d5 (patch)
tree6a8668bce4ceb5f49393ae7baab53262bdafc430
parentd8f74cc439ad025cc52aea8495705096d6538029 (diff)
downloadtor-c46f1b810dab79514d650f44ccf21ca4d24a20d5.tar
tor-c46f1b810dab79514d650f44ccf21ca4d24a20d5.tar.gz
More Extended ORPort code improvements.
* Change name of init_ext_or_auth_cookie_authentication(). * Add a small comment.
-rw-r--r--src/or/config.c2
-rw-r--r--src/or/connection.c1
-rw-r--r--src/or/ext_orport.c2
-rw-r--r--src/or/ext_orport.h2
4 files changed, 4 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 542191dbe..9c1505cf8 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1481,7 +1481,7 @@ options_act(const or_options_t *old_options)
}
/* If we have an ExtORPort, initialize its auth cookie. */
- if (init_ext_or_auth_cookie_authentication(!!options->ExtORPort_lines) < 0) {
+ if (init_ext_or_cookie_authentication(!!options->ExtORPort_lines) < 0) {
log_warn(LD_CONFIG,"Error creating Extended ORPort cookie file.");
return -1;
}
diff --git a/src/or/connection.c b/src/or/connection.c
index fcdc9ab99..6f66f797b 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1406,6 +1406,7 @@ connection_init_accepted_conn(connection_t *conn,
switch (conn->type) {
case CONN_TYPE_EXT_OR:
+ /* Initiate Extended ORPort authentication. */
return connection_ext_or_start_auth(TO_OR_CONN(conn));
case CONN_TYPE_OR:
control_event_or_conn_status(TO_OR_CONN(conn), OR_CONN_EVENT_NEW, 0);
diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c
index 18ee5ab65..f44a3f5d5 100644
--- a/src/or/ext_orport.c
+++ b/src/or/ext_orport.c
@@ -128,7 +128,7 @@ get_ext_or_auth_cookie_file(void)
* authorized to use the control connection. Return -1 if we can't
* write the file, or 0 on success. */
int
-init_ext_or_auth_cookie_authentication(int is_enabled)
+init_ext_or_cookie_authentication(int is_enabled)
{
char *fname;
char cookie_file_string[EXT_OR_PORT_AUTH_COOKIE_FILE_LEN];
diff --git a/src/or/ext_orport.h b/src/or/ext_orport.h
index fbd7ed653..a7038b918 100644
--- a/src/or/ext_orport.h
+++ b/src/or/ext_orport.h
@@ -9,6 +9,6 @@ void connection_or_clear_ext_or_id_map(void);
int connection_ext_or_finished_flushing(or_connection_t *conn);
int connection_ext_or_process_inbuf(or_connection_t *or_conn);
-int init_ext_or_auth_cookie_authentication(int is_enabled);
+int init_ext_or_cookie_authentication(int is_enabled);
char *get_ext_or_auth_cookie_file(void);