[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Set offset properly when parsing cache.



Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/nickm/src/tor/src/or

Modified Files:
	routerparse.c 
Log Message:
Set offset properly when parsing cache.

Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -p -d -r1.186 -r1.187
--- routerparse.c	22 Jun 2006 07:01:54 -0000	1.186
+++ routerparse.c	22 Jun 2006 07:19:28 -0000	1.187
@@ -682,15 +682,17 @@ router_parse_list_from_string(const char
     router = router_parse_entry_from_string(*s, end,
                                             saved_location != SAVED_IN_CACHE);
 
-    *s = end;
+
     if (!router) {
       log_warn(LD_DIR, "Error reading router; skipping");
+      *s = end;
       continue;
     }
     if (saved_location != SAVED_NOWHERE) {
       router->cache_info.saved_location = saved_location;
       router->cache_info.saved_offset = *s - start;
     }
+    *s = end;
     smartlist_add(dest, router);
   }