[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] trivial changes on nick"s rendezvous commit
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
circuitbuild.c circuitlist.c circuituse.c connection.c or.h
rendclient.c
Log Message:
trivial changes on nick's rendezvous commit
Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- circuitbuild.c 29 Jun 2005 21:46:55 -0000 1.121
+++ circuitbuild.c 14 Jul 2005 08:43:19 -0000 1.122
@@ -89,7 +89,7 @@
circ->build_state->is_internal ? "internal" : "exit",
circ->build_state->need_uptime ? " (high-uptime)" : "",
circ->build_state->desired_path_len,
- nickname?nickname:"unnamed");
+ nickname?nickname:"*unnamed*");
smartlist_add(elements, tor_strdup(buf));
}
@@ -103,6 +103,7 @@
if (!hop->extend_info)
break;
elt = hop->extend_info->nickname;
+ tor_assert(elt);
if (verbose) {
size_t len = strlen(elt)+2+strlen(states[hop->state])+1;
char *v = tor_malloc(len);
@@ -309,6 +310,7 @@
firsthop = onion_next_hop_in_cpath(circ->cpath);
tor_assert(firsthop);
+ tor_assert(firsthop->extend_info);
/* now see if we're already connected to the first OR in 'route' */
in.s_addr = htonl(firsthop->extend_info->addr);
@@ -1229,7 +1231,8 @@
log_fn(LOG_INFO,"Using requested exit node '%s'", exit->nickname);
exit = extend_info_dup(exit);
} else { /* we have to decide one */
- routerinfo_t *router = choose_good_exit_server(circ->purpose, rl,
+ routerinfo_t *router =
+ choose_good_exit_server(circ->purpose, rl,
state->need_uptime, state->need_capacity);
if (!router) {
log_fn(LOG_WARN,"failed to choose an exit server");
Index: circuitlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitlist.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- circuitlist.c 1 Jul 2005 02:02:24 -0000 1.53
+++ circuitlist.c 14 Jul 2005 08:43:19 -0000 1.54
@@ -33,7 +33,7 @@
circuit_t *circuit;
};
-/** helper for RB tree: compare the OR connection and circuit ID for a and b,
+/** Helper for RB tree: compare the OR connection and circuit ID for a and b,
* and return less than, equal to, or greater than zero appropriately.
*/
static INLINE int
@@ -52,15 +52,17 @@
RB_PROTOTYPE(orconn_circid_tree, orconn_circid_circuit_map_t, node, compare_orconn_circid_entries);
RB_GENERATE(orconn_circid_tree, orconn_circid_circuit_map_t, node, compare_orconn_circid_entries);
-/** The most recently returned entyr from circuit_get_by_circid_orconn; used
- * to improve performance when many cells arrive in a row from the same circuit.
+/** The most recently returned entry from circuit_get_by_circid_orconn;
+ * used to improve performance when many cells arrive in a row from the
+ * same circuit.
*/
-/* (We tried using splay trees, but round-robin turned out to make them suck.) */
+/* (We tried using splay trees, but round-robin turned out to make them
+ * suck.) */
struct orconn_circid_circuit_map_t *_last_circid_orconn_ent = NULL;
-/** Set the p_conn or n_conn field of a circuit <b>circ</b>, along with the
- * corresponding circuit ID, and add the circuit as appropriate to the
- * (orconn,id)-\>circuit map. */
+/** Set the p_conn or n_conn field of a circuit <b>circ</b>, along
+ * with the corresponding circuit ID, and add the circuit as appropriate
+ * to the (orconn,id)-\>circuit map. */
void
circuit_set_circid_orconn(circuit_t *circ, uint16_t id,
connection_t *conn,
Index: circuituse.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuituse.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- circuituse.c 29 Jun 2005 21:46:55 -0000 1.76
+++ circuituse.c 14 Jul 2005 08:43:19 -0000 1.77
@@ -703,8 +703,8 @@
* success. */
#define MAX_CIRCUIT_FAILURES 5
-/** Launch a new circuit; see circuit_launch_by_extend_info for details on
- * arguments. */
+/** Launch a new circuit; see circuit_launch_by_extend_info() for
+ * details on arguments. */
circuit_t *
circuit_launch_by_router(uint8_t purpose, routerinfo_t *exit,
int need_uptime, int need_capacity, int internal)
@@ -788,8 +788,8 @@
need_uptime, need_capacity, internal);
}
-/** Launch a new circuit; see circuit_launch_by_extend_info for details on
- * arguments. */
+/** Launch a new circuit; see circuit_launch_by_extend_info() for
+ * details on arguments. */
circuit_t *
circuit_launch_by_nickname(uint8_t purpose, const char *exit_nickname,
int need_uptime, int need_capacity, int internal)
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.382
retrieving revision 1.383
diff -u -d -r1.382 -r1.383
--- connection.c 13 Jul 2005 05:14:42 -0000 1.382
+++ connection.c 14 Jul 2005 08:43:19 -0000 1.383
@@ -38,10 +38,10 @@
case CONN_TYPE_OR_LISTENER: return "OR listener";
case CONN_TYPE_OR: return "OR";
case CONN_TYPE_EXIT: return "Exit";
- case CONN_TYPE_AP_LISTENER: return "App listener";
- case CONN_TYPE_AP: return "App";
- case CONN_TYPE_DIR_LISTENER: return "Dir listener";
- case CONN_TYPE_DIR: return "Dir";
+ case CONN_TYPE_AP_LISTENER: return "Socks listener";
+ case CONN_TYPE_AP: return "Socks";
+ case CONN_TYPE_DIR_LISTENER: return "Directory listener";
+ case CONN_TYPE_DIR: return "Directory";
case CONN_TYPE_DNSWORKER: return "DNS worker";
case CONN_TYPE_CPUWORKER: return "CPU worker";
case CONN_TYPE_CONTROL_LISTENER: return "Control listener";
Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.625
retrieving revision 1.626
diff -u -d -r1.625 -r1.626
--- or.h 13 Jul 2005 17:24:55 -0000 1.625
+++ or.h 14 Jul 2005 08:43:19 -0000 1.626
@@ -767,15 +767,15 @@
char *signing_router;
} routerlist_t;
-/** Informetation on router used when extending a circuit. (We don't need a
+/** Information on router used when extending a circuit. (We don't need a
* full routerinfo_t to extend: we only need addr:port:keyid to build an OR
* connection, and onion_key to create the onionskin.) */
typedef struct extend_info_t {
- char nickname[MAX_HEX_NICKNAME_LEN+1]; /**< This router's nickname for display*/
- char identity_digest[DIGEST_LEN]; /**< Hash of this router's identity key */
- uint32_t addr; /**< IP address in host order */
- uint16_t port; /**< OR port */
- crypto_pk_env_t *onion_key; /**< Current onionskin key */
+ char nickname[MAX_HEX_NICKNAME_LEN+1]; /**< This router's nickname for display. */
+ char identity_digest[DIGEST_LEN]; /**< Hash of this router's identity key. */
+ uint32_t addr; /**< IP address in host order. */
+ uint16_t port; /**< OR port. */
+ crypto_pk_env_t *onion_key; /**< Current onionskin key. */
} extend_info_t;
#define CRYPT_PATH_MAGIC 0x70127012u
@@ -1749,12 +1749,12 @@
/********************************* rendcommon.c ***************************/
-/** Information used to connect to a hidden service. */
+/** Information used to connect to a hidden service. */
typedef struct rend_service_descriptor_t {
crypto_pk_env_t *pk; /**< This service's public key. */
- int version; /**< 0 or 1 */
+ int version; /**< 0 or 1. */
time_t timestamp; /**< Time when the descriptor was generated. */
- uint16_t protocols; /**< Bitmask: which rendezvous protocols are supporeted?
+ uint16_t protocols; /**< Bitmask: which rendezvous protocols are supported?
* (We allow bits '0', '1', and '2' to be set.) */
int n_intro_points; /**< Number of introduction points. */
/** Array of n_intro_points elements for this service's introduction points'
Index: rendclient.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/rendclient.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- rendclient.c 29 Jun 2005 21:46:55 -0000 1.90
+++ rendclient.c 14 Jul 2005 08:43:19 -0000 1.91
@@ -214,7 +214,7 @@
*/
if (rend_client_remove_intro_point(circ->build_state->chosen_exit,
circ->rend_query) > 0) {
- /* There are introduction points left. re-extend the circuit to
+ /* There are introduction points left. Re-extend the circuit to
* another intro point and try again. */
extend_info_t *info;
int result;
@@ -225,7 +225,7 @@
circuit_mark_for_close(circ);
return -1;
}
- log_fn(LOG_INFO,"Got nack for %s from %s, extending circ %d to %s.",
+ log_fn(LOG_INFO,"Got nack for %s from %s. Re-extending circ %d, this time to %s.",
safe_str(circ->rend_query),
circ->build_state->chosen_exit->nickname, circ->n_circ_id,
info->nickname);