[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8507: Fix for reverse dns: only assume we will get an answer when (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8507: Fix for reverse dns: only assume we will get an answer when (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Tue, 26 Sep 2006 18:03:23 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 26 Sep 2006 18:03:30 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-09-26 18:03:23 -0400 (Tue, 26 Sep 2006)
New Revision: 8507
Modified:
tor/trunk/
tor/trunk/src/or/dns.c
Log:
r8968@Kushana: nickm | 2006-09-26 17:53:27 -0400
Fix for reverse dns: only assume we will get an answer when the result was success.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r8968] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2006-09-25 22:34:27 UTC (rev 8506)
+++ tor/trunk/src/or/dns.c 2006-09-26 22:03:23 UTC (rev 8507)
@@ -861,8 +861,13 @@
strlcpy(resolve->address, address, sizeof(resolve->address));
resolve->is_reverse = is_reverse;
if (is_reverse) {
- tor_assert(hostname);
- resolve->result.hostname = tor_strdup(hostname);
+ if (outcome == DNS_RESOLVE_SUCCEEDED) {
+ tor_assert(hostname);
+ resolve->result.hostname = tor_strdup(hostname);
+ } else {
+ tor_assert(! hostname);
+ resolve->result.hostname = NULL;
+ }
} else {
tor_assert(!hostname);
resolve->result.addr = addr;