[or-cvs] r10509: Remove some deadcode that seems unlikely to return (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Wed Jun 6 04:51:26 UTC 2007
Author: nickm
Date: 2007-06-06 00:51:25 -0400 (Wed, 06 Jun 2007)
New Revision: 10509
Modified:
tor/trunk/
tor/trunk/src/or/buffers.c
tor/trunk/src/or/connection.c
tor/trunk/src/or/main.c
tor/trunk/src/or/routerlist.c
Log:
r13274 at catbus: nickm | 2007-06-05 19:06:30 -0400
Remove some deadcode that seems unlikely to return
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13274] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c 2007-06-06 02:12:26 UTC (rev 10508)
+++ tor/trunk/src/or/buffers.c 2007-06-06 04:51:25 UTC (rev 10509)
@@ -280,16 +280,6 @@
tor_free(mem);
--list->len;
}
-#if 0
- /* XXXX020 Put this code back if the above gives us nasty segfaults. */
- for (i = list->slack; i < list->lowwater; ++i) {
- char *mem = list->list;
- tor_assert(mem);
- list->list = *(char**)mem;
- tor_free(mem);
- --list->len;
- }
-#endif
}
list->lowwater = list->len;
}
Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c 2007-06-06 02:12:26 UTC (rev 10508)
+++ tor/trunk/src/or/connection.c 2007-06-06 04:51:25 UTC (rev 10509)
@@ -2764,15 +2764,6 @@
assert_buf_ok(conn->outbuf);
}
- /* XXXX Fix this; no longer so.*/
-#if 0
- if (conn->type != CONN_TYPE_OR && conn->type != CONN_TYPE_DIR)
- tor_assert(!conn->pkey);
- /* pkey is set if we're a dir client, or if we're an OR in state OPEN
- * connected to another OR.
- */
-#endif
-
if (conn->chosen_exit_optional) {
tor_assert(conn->type == CONN_TYPE_AP);
tor_assert((TO_EDGE_CONN(conn))->chosen_exit_name);
Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c 2007-06-06 02:12:26 UTC (rev 10508)
+++ tor/trunk/src/or/main.c 2007-06-06 04:51:25 UTC (rev 10509)
@@ -1282,21 +1282,6 @@
* configuration options. */
cpuworkers_rotate();
dns_reset();
-#if 0
- const char *descriptor;
- char keydir[512];
- /* Write out a fresh descriptor, but leave old one on failure. */
- router_rebuild_descriptor(1);
- descriptor = router_get_my_descriptor();
- if (descriptor) {
- tor_snprintf(keydir,sizeof(keydir),"%s"PATH_SEPARATOR"router.desc",
- options->DataDirectory);
- log_info(LD_OR,"Saving descriptor to \"%s\"...",keydir);
- if (write_str_to_file(keydir, descriptor, 0)) {
- return 0;
- }
- }
-#endif
}
return 0;
}
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-06-06 02:12:26 UTC (rev 10508)
+++ tor/trunk/src/or/routerlist.c 2007-06-06 04:51:25 UTC (rev 10509)
@@ -1703,10 +1703,6 @@
desc, tor_strndup(r, 64));
}
tor_assert(!memcmp("router ", r, 7) || !memcmp("extra-info ", r, 11));
-#if 0
- tor_assert(!memcmp("\n-----END SIGNATURE-----\n",
- r + len - 25, 25));
-#endif
return r;
}
More information about the tor-commits
mailing list