summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-09-05 21:19:53 +0000
committerNick Mathewson <nickm@torproject.org>2008-09-05 21:19:53 +0000
commit339f09405608ac5277fc0f43f459352967e7803d (patch)
treecc5d0348b4046acd4b81ef3cf5a881663da1b80b /src/or/directory.c
parenta34550667298dcff6cbd7333288d71808b800b33 (diff)
downloadtor-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.c3
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);