diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-09-05 21:19:53 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-09-05 21:19:53 +0000 |
commit | 339f09405608ac5277fc0f43f459352967e7803d (patch) | |
tree | cc5d0348b4046acd4b81ef3cf5a881663da1b80b /src/or/directory.c | |
parent | a34550667298dcff6cbd7333288d71808b800b33 (diff) | |
download | tor-339f09405608ac5277fc0f43f459352967e7803d.tar.gz tor-339f09405608ac5277fc0f43f459352967e7803d.zip |
Refactor some code and add some asserts based on scanner results.
svn:r16783
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index e7b37e4c1f..4f4d94af33 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -925,6 +925,7 @@ directory_send_command(dir_connection_t *conn, url = tor_strdup("/tor/running-routers"); break; case DIR_PURPOSE_FETCH_NETWORKSTATUS: + tor_assert(resource); httpcommand = "GET"; len = strlen(resource)+32; url = tor_malloc(len); @@ -962,12 +963,14 @@ directory_send_command(dir_connection_t *conn, url = tor_strdup("/tor/status-vote/next/consensus-signatures.z"); break; case DIR_PURPOSE_FETCH_SERVERDESC: + tor_assert(resource); httpcommand = "GET"; len = strlen(resource)+32; url = tor_malloc(len); tor_snprintf(url, len, "/tor/server/%s", resource); break; case DIR_PURPOSE_FETCH_EXTRAINFO: + tor_assert(resource); httpcommand = "GET"; len = strlen(resource)+32; url = tor_malloc(len); |