mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
r14363@Kushana: nickm | 2007-09-08 16:25:45 -0400
Another round of whitespeace fixes. svn:r11407
This commit is contained in:
parent
509bc3b4a0
commit
565f5f32c5
@ -1263,8 +1263,8 @@ parse_http_time(const char *date, struct tm *tm)
|
|||||||
* model the user's computer as being "skewed" from accurate time by
|
* model the user's computer as being "skewed" from accurate time by
|
||||||
* -<b>ftime_skew</b> seconds, such that our best guess of the current time is
|
* -<b>ftime_skew</b> seconds, such that our best guess of the current time is
|
||||||
* time(NULL)+ftime_skew. We also assume that our measurements of time may
|
* time(NULL)+ftime_skew. We also assume that our measurements of time may
|
||||||
* have up to <b>ftime_slop</b> seconds of inaccuracy; hence, the
|
* have up to <b>ftime_slop</b> seconds of inaccuracy; IOW, our window of
|
||||||
* measurements;
|
* estimate for the current time is now + ftime_skew +/- ftime_slop.
|
||||||
*/
|
*/
|
||||||
static int ftime_skew = 0;
|
static int ftime_skew = 0;
|
||||||
static int ftime_slop = 60;
|
static int ftime_slop = 60;
|
||||||
@ -1290,13 +1290,13 @@ ftime_get_window(time_t now, ftime_t *ft_out)
|
|||||||
int
|
int
|
||||||
ftime_maybe_after(time_t now, time_t when)
|
ftime_maybe_after(time_t now, time_t when)
|
||||||
{
|
{
|
||||||
/* It may be after when iff the latest possible current time is after when. */
|
/* It may be after when iff the latest possible current time is after when */
|
||||||
return (now + ftime_skew + ftime_slop) >= when;
|
return (now + ftime_skew + ftime_slop) >= when;
|
||||||
}
|
}
|
||||||
int
|
int
|
||||||
ftime_maybe_before(time_t now, time_t when)
|
ftime_maybe_before(time_t now, time_t when)
|
||||||
{
|
{
|
||||||
/* It may be before when iff the earliest possible current time is before. */
|
/* It may be before when iff the earliest possible current time is before */
|
||||||
return (now + ftime_skew - ftime_slop) < when;
|
return (now + ftime_skew - ftime_slop) < when;
|
||||||
}
|
}
|
||||||
int
|
int
|
||||||
|
@ -995,8 +995,8 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len,
|
|||||||
int also_password = options->HashedControlPassword != NULL;
|
int also_password = options->HashedControlPassword != NULL;
|
||||||
if (password_len != AUTHENTICATION_COOKIE_LEN) {
|
if (password_len != AUTHENTICATION_COOKIE_LEN) {
|
||||||
if (!also_password) {
|
if (!also_password) {
|
||||||
log_warn(LD_CONTROL, "Got authentication cookie with wrong length (%d)",
|
log_warn(LD_CONTROL, "Got authentication cookie with wrong length "
|
||||||
(int)password_len);
|
"(%d)", (int)password_len);
|
||||||
errstr = "Wrong length on authentication cookie.";
|
errstr = "Wrong length on authentication cookie.";
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -1021,7 +1021,7 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len,
|
|||||||
if (!also_cookie) {
|
if (!also_cookie) {
|
||||||
log_warn(LD_CONTROL,
|
log_warn(LD_CONTROL,
|
||||||
"Couldn't decode HashedControlPassword: invalid base16");
|
"Couldn't decode HashedControlPassword: invalid base16");
|
||||||
errstr ="Couldn't decode HashedControlPassword value in configuration.";
|
errstr="Couldn't decode HashedControlPassword value in configuration.";
|
||||||
}
|
}
|
||||||
bad_password = 1;
|
bad_password = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -1290,7 +1290,6 @@ munge_extrainfo_into_routerinfo(const char *ri_body, signed_descriptor_t *ri,
|
|||||||
return tor_strndup(ri_body, ri->signed_descriptor_len);
|
return tor_strndup(ri_body, ri->signed_descriptor_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Implementation helper for GETINFO: knows the answers for questions about
|
/** Implementation helper for GETINFO: knows the answers for questions about
|
||||||
* directory information. */
|
* directory information. */
|
||||||
static int
|
static int
|
||||||
|
@ -16,7 +16,7 @@ const char dirvote_c_id[] =
|
|||||||
static int dirvote_add_signatures_to_pending_consensus(
|
static int dirvote_add_signatures_to_pending_consensus(
|
||||||
const char *detached_signatures_body,
|
const char *detached_signatures_body,
|
||||||
const char **msg_out);
|
const char **msg_out);
|
||||||
static char *list_v3_auth_ids(void); //XXXX020 nuke this.
|
static char *list_v3_auth_ids(void);
|
||||||
|
|
||||||
/* =====
|
/* =====
|
||||||
* Voting and consensus generation
|
* Voting and consensus generation
|
||||||
|
Loading…
Reference in New Issue
Block a user