diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-04 16:21:58 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-04 16:21:58 +0000 |
commit | 6f7847b378a67ad29cdeb9a3c1304de474bf46c0 (patch) | |
tree | 8f7b10020d50f6a3175a7c9e076da649c357641f /src/or/control.c | |
parent | cc7e0f62b512f4b9446ba3ef2cdb702ee14ad82f (diff) | |
download | tor-6f7847b378a67ad29cdeb9a3c1304de474bf46c0.tar tor-6f7847b378a67ad29cdeb9a3c1304de474bf46c0.tar.gz |
r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.
svn:r11761
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/or/control.c b/src/or/control.c index aa4d6af77..fa2ba855b 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1249,7 +1249,15 @@ getinfo_helper_misc(control_connection_t *conn, const char *question, return 0; } -/** DOCDOC */ +/** Awful hack: return a newly allocated string based on a routerinfo and + * (possibly) an extrainfo, sticking the read-history and write-history from + * <b>ei</b> into the resulting string. The thing you get back won't + * necessarily have a valid signature. + * + * New code should never use this; it's for backward compatibiliy. + * + * NOTE: <b>ri_body</b> is as returned by signed_descriptor_get_body: it might + * not be NUL-terminated. */ static char * munge_extrainfo_into_routerinfo(const char *ri_body, signed_descriptor_t *ri, signed_descriptor_t *ei) @@ -2355,7 +2363,8 @@ handle_control_closecircuit(control_connection_t *conn, uint32_t len, return 0; } -/** DOCDOC */ +/** Called when we get a RESOLVE command: start trying to resolve + * the listed addresses. */ static int handle_control_resolve(control_connection_t *conn, uint32_t len, const char *body) @@ -2390,7 +2399,7 @@ handle_control_resolve(control_connection_t *conn, uint32_t len, return 0; } -/** DOCDOC */ +/** Called when we get a PROTOCOLINFO command: send back a reply. */ static int handle_control_protocolinfo(control_connection_t *conn, uint32_t len, const char *body) @@ -3554,7 +3563,8 @@ control_event_guard(const char *nickname, const char *digest, return 0; } -/** DOCDOC */ +/** Helper: Return a newly allocated string containing a path to the + * file where we store our authentication cookie. */ static char * get_cookie_file(void) { |