Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
6874c399
Commit
6874c399
authored
Oct 27, 2004
by
Nick Mathewson
⛰
Browse files
Fix windows build
svn:r2613
parent
c5eb95b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/common/util.c
View file @
6874c399
...
...
@@ -2346,7 +2346,7 @@ int tor_vsnprintf(char *str, size_t size, const char *format, va_list args)
r
=
vsnprintf
(
str
,
size
,
format
,
args
);
#endif
str
[
size
-
1
]
=
'\0'
;
if
(
r
<
0
||
r
>=
size
)
if
(
r
<
0
||
((
size_t
)
r
)
>=
size
)
return
-
1
;
return
r
;
}
...
...
src/or/config.c
View file @
6874c399
...
...
@@ -309,7 +309,7 @@ config_assign_line(or_options_t *options, struct config_line_t *c)
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
:
...
...
src/or/dirserv.c
View file @
6874c399
...
...
@@ -511,8 +511,9 @@ list_server_status(char **running_routers_out, char **router_status_out)
SMARTLIST_FOREACH
(
descriptor_list
,
descriptor_entry_t
*
,
d
,
{
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
));
...
...
src/or/dns.c
View file @
6874c399
...
...
@@ -159,7 +159,7 @@ static void send_resolved_cell(connection_t *conn, uint8_t answer_type)
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:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment