diff --git a/src/or/or.h b/src/or/or.h index 6c073d6ee1..36bc9f21fd 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -250,14 +250,6 @@ typedef enum { /** State for any listener connection. */ #define LISTENER_STATE_READY 0 -#define _DNSWORKER_STATE_MIN 1 -/** State for a connection to a dnsworker process that's idle. */ -#define DNSWORKER_STATE_IDLE 1 -/** State for a connection to a dnsworker process that's resolving a - * hostname. */ -#define DNSWORKER_STATE_BUSY 2 -#define _DNSWORKER_STATE_MAX 2 - #define _CPUWORKER_STATE_MIN 1 /** State for a connection to a cpuworker process that's idle. */ #define CPUWORKER_STATE_IDLE 1 diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 47015e531d..be984d2634 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -179,10 +179,10 @@ typedef struct token_rule_t { static token_rule_t routerdesc_token_table[] = { T0N("reject", K_REJECT, ARGS, NO_OBJ ), T0N("accept", K_ACCEPT, ARGS, NO_OBJ ), - T1( "router", K_ROUTER, GE(5), NO_OBJ ), + T1_START( "router", K_ROUTER, GE(5), NO_OBJ ), T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ), T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ), - T1( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ), + T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ), T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ), T01("uptime", K_UPTIME, GE(1), NO_OBJ ), T01("fingerprint", K_FINGERPRINT, CONCAT_ARGS, NO_OBJ ), @@ -205,12 +205,12 @@ static token_rule_t routerdesc_token_table[] = { /** List of tokens allowable in extra-info documents. */ static token_rule_t extrainfo_token_table[] = { - T1( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ), + T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ), T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ), T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ), T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ), T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ), - T1( "extra-info", K_EXTRA_INFO, GE(2), NO_OBJ ), + T1_START( "extra-info", K_EXTRA_INFO, GE(2), NO_OBJ ), END_OF_TABLE }; diff --git a/src/or/test.c b/src/or/test.c index 610a297f1a..ee432f3a4f 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -1024,16 +1024,6 @@ _test_eq_ip6(struct in6_addr *a, struct in6_addr *b, const char *e1, test_eq_ip6(&a1, &a2); \ } while (0) -#define test_ntop6_reduces2(a,b,c) do { \ - r = tor_inet_pton(AF_INET6, a, &a1); \ - test_assert(r==1); \ - test_assert(tor_inet_ntop(AF_INET6, &a1, buf, sizeof(buf))); \ - test_assert(!strcmp(buf, b) || !strcmp(buf, c)); \ - r = tor_inet_pton(AF_INET6, b, &a2); \ - test_assert(r==1); \ - test_eq_ip6(&a1, &a2); \ - } while (0) - static void test_ip6_helpers(void) {