diff options
author | Desoxy <desoxy@fastmail.fm> | 2013-04-03 18:50:51 +0200 |
---|---|---|
committer | Desoxy <desoxy@fastmail.fm> | 2013-04-03 18:50:51 +0200 |
commit | 74f5e304e49b8ccde2b97232c49e5025dba21f59 (patch) | |
tree | cc3639e1857f21444dc019cbf0cfc56b6b93806f /src/or/connection_edge.c | |
parent | 2c40138210fe934f687470fc4bd20513982bf424 (diff) | |
download | tor-74f5e304e49b8ccde2b97232c49e5025dba21f59.tar.gz tor-74f5e304e49b8ccde2b97232c49e5025dba21f59.zip |
Controller: Add CACHED keyword to ADDRMAP events (#8596 part 2/2)
Add keyword CACHED="YES"/"NO" to ADDRMAP control events to indicate whether the
DNS response will be cached or not.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 0519708810..926fcab90c 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -2044,18 +2044,17 @@ tell_controller_about_resolved_result(entry_connection_t *conn, if (answer_type == RESOLVED_TYPE_IPV4 && answer_len >= 4) { char *cp = tor_dup_ip(ntohl(get_uint32(answer))); control_event_address_mapped(conn->socks_request->address, - cp, expires, NULL); + cp, expires, NULL, 0); tor_free(cp); } else if (answer_type == RESOLVED_TYPE_HOSTNAME && answer_len < 256) { char *cp = tor_strndup(answer, answer_len); control_event_address_mapped(conn->socks_request->address, - cp, expires, NULL); + cp, expires, NULL, 0); tor_free(cp); } else { control_event_address_mapped(conn->socks_request->address, - "<error>", - time(NULL)+ttl, - "error=yes"); + "<error>", time(NULL)+ttl, + "error=yes", 0); } } |