summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-02 02:47:42 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-02 02:47:42 +0000
commitf901cd064c77645d30782f331ae48abd0f32eb5b (patch)
tree4d662b919b84bae2a936d2fd95462fa0785f847d /src
parent9b1b8199dfbf16519d1e18d49f80f253db687064 (diff)
downloadtor-f901cd064c77645d30782f331ae48abd0f32eb5b.tar.gz
tor-f901cd064c77645d30782f331ae48abd0f32eb5b.zip
clean up the dirserv_add_multiple_descriptors() api
svn:r12630
Diffstat (limited to 'src')
-rw-r--r--src/or/directory.c8
-rw-r--r--src/or/dirserv.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 802cfedd0a..c23de68331 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2704,12 +2704,12 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
if (r > 0)
dirserv_get_directory(); /* rebuild and write to disk */
switch (r) {
- case -2:
case -1:
- case 1:
log_notice(LD_DIRSERV,
- "Rejected router descriptor or extra-info from %s.",
- conn->_base.address);
+ "Rejected router descriptor or extra-info from %s (\"%s\").",
+ conn->_base.address, msg);
+ /* fall through */
+ case 1:
/* malformed descriptor, or something wrong */
write_http_status_line(conn, 400, msg);
break;
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 3b4c8e2382..a040b6263d 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -627,7 +627,7 @@ dirserv_add_multiple_descriptors(const char *desc, uint8_t purpose,
* Return 2 if descriptor is well-formed and accepted;
* 1 if well-formed and accepted but origin should hear *msg;
* 0 if well-formed but redundant with one we already have;
- * -1 if it looks vaguely like a router descriptor but rejected;
+ * -1 if it is rejected and origin should hear *msg;
*
* This function is only called when fresh descriptors are posted, not when
* we re-load the cache.