diff options
author | Roger Dingledine <arma@torproject.org> | 2004-06-30 21:48:02 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-06-30 21:48:02 +0000 |
commit | f42f04c859a68dab45d021dd4197da816ec72b07 (patch) | |
tree | be4634b8becfc47b80be3e6c83d8127a26badea3 /src/or/directory.c | |
parent | 29818d5b6bccce2d4e6678cce82ebdefa47883bb (diff) | |
download | tor-f42f04c859a68dab45d021dd4197da816ec72b07.tar.gz tor-f42f04c859a68dab45d021dd4197da816ec72b07.zip |
cleanups on 008pre1 items
svn:r1993
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 61c98df4c0..868f614ab5 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -80,6 +80,9 @@ void directory_get_from_dirserver(uint8_t purpose, const char *payload, int payload_len) { + /* FFFF we might pass pick_directory_server a boolean to prefer + * picking myself for some purposes, or prefer picking not myself + * for other purposes. */ directory_initiate_command(router_pick_directory_server(), purpose, payload, payload_len); } @@ -498,6 +501,10 @@ directory_handle_command_get(connection_t *conn, char *headers, if(!strcmp(url,"/running-routers")) { /* running-routers fetch */ dlen = dirserv_get_runningrouters(&cp); + if(dlen < 0) { /* we failed to create cp */ + connection_write_to_buf(answer503, strlen(answer503), conn); + return 0; + } snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/plain\r\n\r\n", (int)dlen); |