mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
fix whitespace; remove dead code
This commit is contained in:
parent
2bf8fb5ee3
commit
65a6489e5e
@ -1505,7 +1505,6 @@ run_scheduled_events(time_t now)
|
|||||||
/* 11b. check pending unconfigured managed proxies */
|
/* 11b. check pending unconfigured managed proxies */
|
||||||
if (!net_is_disabled() && pt_proxies_configuration_pending())
|
if (!net_is_disabled() && pt_proxies_configuration_pending())
|
||||||
pt_configure_remaining_proxies();
|
pt_configure_remaining_proxies();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1891,7 +1890,6 @@ expire_old_ciruits_serverside_callback(time_t now, const or_options_t *options)
|
|||||||
return 11;
|
return 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
check_dns_honesty_callback(time_t now, const or_options_t *options)
|
check_dns_honesty_callback(time_t now, const or_options_t *options)
|
||||||
{
|
{
|
||||||
|
@ -104,15 +104,3 @@ periodic_event_destroy(periodic_event_item_t *event)
|
|||||||
event->last_action_time = 0;
|
event->last_action_time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** DOCDOC */
|
|
||||||
void
|
|
||||||
periodic_event_assert_in_range(periodic_event_item_t *ev,
|
|
||||||
time_t start, time_t end)
|
|
||||||
{
|
|
||||||
if (ev->last_action_time < start-1 || ev->last_action_time > end) {
|
|
||||||
log_err(LD_BUG, "[Refactor Bug] Missed an interval in a range,"
|
|
||||||
"Got %lu, wanted %lu <= x <= %lu.", ev->last_action_time,
|
|
||||||
start, end);
|
|
||||||
tor_assert(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
typedef int (*periodic_event_helper_t)(time_t now,
|
typedef int (*periodic_event_helper_t)(time_t now,
|
||||||
const or_options_t *options);
|
const or_options_t *options);
|
||||||
|
|
||||||
|
|
||||||
/** A single item for the periodic-events-function table. */
|
/** A single item for the periodic-events-function table. */
|
||||||
typedef struct periodic_event_item_t {
|
typedef struct periodic_event_item_t {
|
||||||
periodic_event_helper_t fn; /**< The function to run the event */
|
periodic_event_helper_t fn; /**< The function to run the event */
|
||||||
@ -27,26 +26,6 @@ typedef struct periodic_event_item_t {
|
|||||||
#define PERIODIC_EVENT(fn) { fn##_callback, 0, 0, NULL, #fn }
|
#define PERIODIC_EVENT(fn) { fn##_callback, 0, 0, NULL, #fn }
|
||||||
#define END_OF_PERIODIC_EVENTS { NULL, 0, 0, NULL, NULL }
|
#define END_OF_PERIODIC_EVENTS { NULL, 0, 0, NULL, NULL }
|
||||||
|
|
||||||
#if 0
|
|
||||||
/** Refactor test, check the last_action_time was now or (now - delta - 1)
|
|
||||||
* It returns an incremented <b>now</b> value and accounts for the current
|
|
||||||
* implementation's off by one error in it's comparisons. */
|
|
||||||
#define INCREMENT_DELTA_AND_TEST(id, now, delta) \
|
|
||||||
(now+delta); \
|
|
||||||
STMT_BEGIN \
|
|
||||||
periodic_event_item_t *ev = &periodic_events[id]; \
|
|
||||||
if (ev->last_action_time != now - delta - 1 && \
|
|
||||||
ev->last_action_time != now) { \
|
|
||||||
log_err(LD_BUG, "[Refactor Bug] Missed an interval " \
|
|
||||||
"for %s, Got %lu, wanted %lu or %lu.", ev->name, \
|
|
||||||
ev->last_action_time, now, now-delta); \
|
|
||||||
tor_assert(0); \
|
|
||||||
} \
|
|
||||||
STMT_END
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void periodic_event_assert_in_range(periodic_event_item_t *event,
|
|
||||||
time_t start, time_t end);
|
|
||||||
void periodic_event_launch(periodic_event_item_t *event);
|
void periodic_event_launch(periodic_event_item_t *event);
|
||||||
void periodic_event_destroy(periodic_event_item_t *event);
|
void periodic_event_destroy(periodic_event_item_t *event);
|
||||||
void periodic_event_reschedule(periodic_event_item_t *event);
|
void periodic_event_reschedule(periodic_event_item_t *event);
|
||||||
|
Loading…
Reference in New Issue
Block a user