[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10391: Oops; better version of previous patch that does not get cau (in tor/trunk: . src/or)
Author: nickm
Date: 2007-05-29 11:08:55 -0400 (Tue, 29 May 2007)
New Revision: 10391
Modified:
tor/trunk/
tor/trunk/src/or/routerparse.c
Log:
r13048@catbus: nickm | 2007-05-29 11:08:53 -0400
Oops; better version of previous patch that does not get caught in an infinite loop.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13048] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c 2007-05-29 15:07:16 UTC (rev 10390)
+++ tor/trunk/src/or/routerparse.c 2007-05-29 15:08:55 UTC (rev 10391)
@@ -900,23 +900,26 @@
if (!end)
break;
+ elt = NULL;
+
if (have_extrainfo && want_extrainfo) {
routerlist_t *rl = router_get_routerlist();
extrainfo = extrainfo_parse_entry_from_string(*s, end,
saved_location != SAVED_IN_CACHE,
rl->identity_map);
- if (!extrainfo)
- continue;
- signed_desc = &extrainfo->cache_info;
- elt = extrainfo;
+ if (extrainfo) {
+ signed_desc = &extrainfo->cache_info;
+ elt = extrainfo;
+ }
} else if (!have_extrainfo && !want_extrainfo) {
router = router_parse_entry_from_string(*s, end,
saved_location != SAVED_IN_CACHE);
- if (!router)
- continue;
- signed_desc = &router->cache_info;
- elt = router;
- } else {
+ if (router) {
+ signed_desc = &router->cache_info;
+ elt = router;
+ }
+ }
+ if (!elt) {
*s = end;
continue;
}