[or-cvs] r14474: apply patch from lodger to simplify code a bit (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Fri Apr 25 18:42:43 UTC 2008
Author: arma
Date: 2008-04-25 14:42:42 -0400 (Fri, 25 Apr 2008)
New Revision: 14474
Modified:
tor/trunk/src/or/dns.c
Log:
apply patch from lodger to simplify code a bit
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2008-04-25 12:09:20 UTC (rev 14473)
+++ tor/trunk/src/or/dns.c 2008-04-25 18:42:42 UTC (rev 14474)
@@ -549,11 +549,12 @@
or_circuit_t *oncirc = TO_OR_CIRCUIT(exitconn->on_circuit);
int is_resolve, r;
char *hostname = NULL;
- routerinfo_t *me = router_get_my_routerinfo();
+ routerinfo_t *me;
is_resolve = exitconn->_base.purpose == EXIT_PURPOSE_RESOLVE;
- if (is_resolve && me &&
- policy_is_reject_star(me->exit_policy)) /* non-exit */
+ if (is_resolve &&
+ (!(me = router_get_my_routerinfo()) ||
+ policy_is_reject_star(me->exit_policy))) /* non-exit */
r = -1;
else
r = dns_resolve_impl(exitconn, is_resolve, oncirc, &hostname);
More information about the tor-commits
mailing list