]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
remove last vestiges of op_port
authorRoger Dingledine <arma@torproject.org>
Wed, 27 Aug 2003 22:42:10 +0000 (22:42 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 27 Aug 2003 22:42:10 +0000 (22:42 +0000)
svn:r418

src/or/main.c
src/or/or.h
src/or/routers.c
src/or/test.c

index 720be45fe1dfe3e675cca8b0d30240ef77915596..0bb241a9dee305805e391eacf7ce17c66f8354c0 100644 (file)
@@ -661,10 +661,9 @@ int dump_router_to_string(char *s, int maxlen, routerinfo_t *router) {
     signing_pkey_tag = "signing-key\n";
   }
   
-  result = snprintf(s, maxlen, "router %s %d %d %d %d %d\n%s%s%s",
+  result = snprintf(s, maxlen, "router %s %d %d %d %d\n%s%s%s",
     router->address,
     router->or_port,
-    router->op_port,
     router->ap_port,
     router->dir_port,
     router->bandwidth,
index 77477497a6b7ca8c141e9d065728260627237457..9a8bb36276991c015fcd26422b29e5440796f6e5 100644 (file)
@@ -362,7 +362,6 @@ typedef struct {
  
   uint32_t addr; /* all host order */
   uint16_t or_port;
-  uint16_t op_port;
   uint16_t ap_port;
   uint16_t dir_port;
  
index c6e4d1012f795a0dc84c1b9f3477d2b3e2b3a64a..ada7ee66cef3830c47591701d3b7a55347dbaf9a 100644 (file)
@@ -742,7 +742,7 @@ static routerinfo_t *router_get_entry_from_string_tok(char**s, directory_token_t
      thank me for this someday. */
   router->pkey = router->signing_pkey = NULL; 
 
-  if (tok->val.cmd.n_args != 6) {
+  if (tok->val.cmd.n_args != 5) {
     log(LOG_ERR,"router_get_entry_from_string(): Wrong # of arguments to \"router\"");
     goto err;
   }
@@ -759,23 +759,20 @@ static routerinfo_t *router_get_entry_from_string_tok(char**s, directory_token_t
     goto err;
   }
   
-  /* Router->op_port */
-  router->op_port = atoi(ARGS[2]);
-  
   /* Router->ap_port */
-  router->ap_port = atoi(ARGS[3]);
+  router->ap_port = atoi(ARGS[2]);
   
   /* Router->dir_port */
-  router->dir_port = atoi(ARGS[4]);
+  router->dir_port = atoi(ARGS[3]);
 
   /* Router->bandwidth */
-  router->bandwidth = atoi(ARGS[5]);
+  router->bandwidth = atoi(ARGS[4]);
   if (!router->bandwidth) {
     log(LOG_ERR,"router_get_entry_from_string(): bandwidth unreadable or 0. Failing.");
   }
   
-  log(LOG_DEBUG,"or_port %d, op_port %d, ap_port %d, dir_port %d, bandwidth %d.",
-    router->or_port, router->op_port, router->ap_port, router->dir_port, router->bandwidth);
+  log(LOG_DEBUG,"or_port %d, ap_port %d, dir_port %d, bandwidth %d.",
+    router->or_port, router->ap_port, router->dir_port, router->bandwidth);
 
   NEXT_TOKEN();
   if (tok->tp != _PUBLIC_KEY) { 
index 547f73a079b8bb98203da0b1b5fcde1d73a1f26f..741bb767a91c0c8ae80af2fa7e7e71fc32cfe3a0 100644 (file)
@@ -509,7 +509,6 @@ test_dir_format()
   r1.address = "testaddr1.foo.bar";
   r1.addr = 0xc0a80001u; /* 192.168.0.1 */
   r1.or_port = 9000;
-  r1.op_port = 9001;
   r1.ap_port = 9002;
   r1.dir_port = 9003;
   r1.pkey = pk1;
@@ -529,7 +528,6 @@ test_dir_format()
   r2.address = "tor.tor.tor";
   r2.addr = 0x0a030201u; /* 10.3.2.1 */
   r2.or_port = 9005;
-  r2.op_port = 0;
   r2.ap_port = 0;
   r2.dir_port = 0;
   r2.pkey = pk2;
@@ -554,7 +552,6 @@ test_dir_format()
   test_assert(rp1);
   test_streq(rp1->address, r1.address);
   test_eq(rp1->or_port, r1.or_port);
-  test_eq(rp1->op_port, r1.op_port);
   test_eq(rp1->ap_port, r1.ap_port);
   test_eq(rp1->dir_port, r1.dir_port);
   test_eq(rp1->bandwidth, r1.bandwidth);
@@ -575,7 +572,6 @@ test_dir_format()
   test_assert(rp2);
   test_streq(rp2->address, r2.address);
   test_eq(rp2->or_port, r2.or_port);
-  test_eq(rp2->op_port, r2.op_port);
   test_eq(rp2->ap_port, r2.ap_port);
   test_eq(rp2->dir_port, r2.dir_port);
   test_eq(rp2->bandwidth, r2.bandwidth);