diff --git a/ChangeLog b/ChangeLog index 19f77261d6..319fbf155d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Changes in version 0.1.2.2-alpha - 2006-??-?? + + o Minor Bugfixes + - Small performance improvements on parsing and inserting + descriptors. + Changes in version 0.1.2.1-alpha - 2006-08-27 o Major features: - Add "eventdns" async dns library from Adam Langley, tweaked to diff --git a/src/common/util.c b/src/common/util.c index 8bd1f2aec0..264bd0b74f 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -434,11 +434,20 @@ const char * find_whitespace(const char *s) { /* tor_assert(s); */ - - while (*s && !TOR_ISSPACE(*s) && *s != '#') - s++; - - return s; + while (1) { + switch (*s) + { + case '\0': + case '#': + case ' ': + case '\r': + case '\n': + case '\t': + return s; + default: + ++s; + } + } } /** Return true iff the 'len' bytes at 'mem' are all zero. */ diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 4bc26b13a1..1d067667b9 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1674,7 +1674,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg, routerinfo_t *old_router = smartlist_get(routerlist->routers, i); /* XXXX This might be a slow point; can't we just look up in one of the * digestmaps? -NM */ - if (!crypto_pk_cmp_keys(router->identity_pkey,old_router->identity_pkey)) { + if (!memcmp(router->cache_info.identity_digest, + old_router->cache_info.identity_digest, DIGEST_LEN)) { if (router->cache_info.published_on <= old_router->cache_info.published_on) { /* Same key, but old */