aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-04-26 13:12:43 -0400
committerNick Mathewson <nickm@torproject.org>2011-04-26 13:12:43 -0400
commit33f058a5ba6d57023b00db87c5c9480276bc7acc (patch)
treef76573977b0f8ab5153acf048abed30811961c3f /src
parent47f472510fab2bc2c06e53ee932b13cfe1bdcbe4 (diff)
parentb75d1daf40c0d104b8224df337949753a5e65e74 (diff)
downloadtor-33f058a5ba6d57023b00db87c5c9480276bc7acc.tar
tor-33f058a5ba6d57023b00db87c5c9480276bc7acc.tar.gz
Merge remote-tracking branch 'origin/maint-0.2.2'
Diffstat (limited to 'src')
-rw-r--r--src/or/dnsserv.c2
-rw-r--r--src/or/eventdns.c4
-rw-r--r--src/or/eventdns.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c
index f7a8d35f7..243b730cb 100644
--- a/src/or/dnsserv.c
+++ b/src/or/dnsserv.c
@@ -280,7 +280,7 @@ dnsserv_resolved(edge_connection_t *conn,
conn->socks_request->command == SOCKS_COMMAND_RESOLVE) {
evdns_server_request_add_a_reply(req,
name,
- 1, (char*)answer, ttl);
+ 1, answer, ttl);
} else if (answer_type == RESOLVED_TYPE_HOSTNAME &&
answer_len < 256 &&
conn->socks_request->command == SOCKS_COMMAND_RESOLVE_PTR) {
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index aca76d8d5..e9770c8c7 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -1668,7 +1668,7 @@ evdns_server_request_add_reply(struct evdns_server_request *_req, int section, c
/* exported function */
int
-evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl)
+evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)
{
return evdns_server_request_add_reply(
req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET,
@@ -1677,7 +1677,7 @@ evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *n
/* exported function */
int
-evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl)
+evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)
{
return evdns_server_request_add_reply(
req, EVDNS_ANSWER_SECTION, name, TYPE_AAAA, CLASS_INET,
diff --git a/src/or/eventdns.h b/src/or/eventdns.h
index bf3b64d08..2fe4ac937 100644
--- a/src/or/eventdns.h
+++ b/src/or/eventdns.h
@@ -323,8 +323,8 @@ struct evdns_server_port *evdns_add_server_port(int socket, int is_tcp, evdns_re
void evdns_close_server_port(struct evdns_server_port *port);
int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int class, int ttl, int datalen, int is_name, const char *data);
-int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl);
-int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl);
+int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
+int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl);
int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl);