aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-11-14 01:07:52 +0000
committerNick Mathewson <nickm@torproject.org>2006-11-14 01:07:52 +0000
commit9243e5417704656dbfee91d2b6e06ae19f70aa24 (patch)
tree4a1957e97e4c4d36e0af0e74da1a5162fd60b1dc /src/or/control.c
parent0f6402f17b9d4017aec608b10cb031512c543bc5 (diff)
downloadtor-9243e5417704656dbfee91d2b6e06ae19f70aa24.tar
tor-9243e5417704656dbfee91d2b6e06ae19f70aa24.tar.gz
r9313@totoro: nickm | 2006-11-13 20:07:41 -0500
Try to compile with fewer warnings on irix64's MIPSpro compiler / environment, which apparently believes that: - off_t can be bigger than size_t. - only mean kids assign things they do not subsequently inspect. I don't try to fix the "error" that makes it say: cc-3970 cc: WARNING File = main.c, Line = 1277 conversion from pointer to same-sized integral type (potential portability problem) uintptr_t sig = (uintptr_t)arg; Because really, what can you do about a compiler that claims to be c99 but doesn't understand that void* x = NULL; uintptr_t y = (uintptr_t) x; is safe? svn:r8948
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 18d0e47d2..9470e49e0 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1152,7 +1152,7 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len,
used_quoted_string = 1;
}
}
- if (options->CookieAuthentication) {
+ if (options->CookieAuthentication && authentication_cookie_is_set) {
if (password_len != AUTHENTICATION_COOKIE_LEN) {
log_warn(LD_CONTROL, "Got authentication cookie with wrong length (%d)",
(int)password_len);
@@ -1685,12 +1685,16 @@ handle_getinfo_helper(control_connection_t *control_conn,
} else if (!strcmpstart(question, "dir/server/")) {
size_t answer_len = 0, url_len = strlen(question)+2;
char *url = tor_malloc(url_len);
- int res;
smartlist_t *descs = smartlist_create();
const char *msg;
+ int res;
char *cp;
tor_snprintf(url, url_len, "/tor/%s", question+4);
res = dirserv_get_routerdescs(descs, url, &msg);
+ if (res) {
+ log_warn(LD_CONTROL, "getinfo '%s': %s", question, msg);
+ return -1;
+ }
SMARTLIST_FOREACH(descs, signed_descriptor_t *, sd,
answer_len += sd->signed_descriptor_len);
cp = *answer = tor_malloc(answer_len+1);