[or-cvs] Fix windows build
Nick Mathewson
nickm at seul.org
Wed Oct 27 18:14:41 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv6818/src/or
Modified Files:
config.c dirserv.c dns.c
Log Message:
Fix windows build
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -d -r1.190 -r1.191
--- config.c 27 Oct 2004 17:37:01 -0000 1.190
+++ config.c 27 Oct 2004 18:14:38 -0000 1.191
@@ -309,7 +309,7 @@
c->key = tor_strdup(var->name);
}
- lvalue = ((void*)options) + var->var_offset;
+ lvalue = ((char*)options) + var->var_offset;
switch(var->type) {
case CONFIG_TYPE_UINT:
Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- dirserv.c 27 Oct 2004 12:34:02 -0000 1.105
+++ dirserv.c 27 Oct 2004 18:14:38 -0000 1.106
@@ -510,9 +510,10 @@
SMARTLIST_FOREACH(descriptor_list, descriptor_entry_t *, d,
{
- int is_live;
+ int is_live;
+ connection_t *conn;
tor_assert(d->router);
- connection_t *conn = connection_get_by_identity_digest(
+ conn = connection_get_by_identity_digest(
d->router->identity_digest, CONN_TYPE_OR);
is_live = (conn && conn->state == OR_CONN_STATE_OPEN);
smartlist_add(rr_entries, list_single_server_status(d, is_live, 1));
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- dns.c 27 Oct 2004 06:48:16 -0000 1.115
+++ dns.c 27 Oct 2004 18:14:38 -0000 1.116
@@ -159,7 +159,7 @@
case RESOLVED_TYPE_ERROR_TRANSIENT:
case RESOLVED_TYPE_ERROR:
buf[1] = 24; /* length of "error resolving hostname" */
- strlcpy(buf+2, "error resolving hostname", buf-2);
+ strlcpy(buf+2, "error resolving hostname", sizeof(buf)-2);
buflen = 26;
break;
default:
More information about the tor-commits
mailing list