Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:07:16Zhttps://gitlab.torproject.org/legacy/trac/-/issues/21716Avoid recursive call to routerlist_remove_old_routers via router_rebuild_store2020-06-13T15:07:16ZTracAvoid recursive call to routerlist_remove_old_routers via router_rebuild_storePeriodic functions have their log output duplicated when using adb logcat:
orbot/external/tor/src/or/periodic.c
static void
periodic_event_dispatch(evutil_socket_t fd, short what, void *data)
{
(void)fd;
(void)what;
periodic_even...Periodic functions have their log output duplicated when using adb logcat:
orbot/external/tor/src/or/periodic.c
static void
periodic_event_dispatch(evutil_socket_t fd, short what, void *data)
{
(void)fd;
(void)what;
periodic_event_item_t *event = data;
time_t now = time(NULL);
const or_options_t *options = get_options();
log_debug(LD_GENERAL, "Dispatching %s", event->name);
int r = event->fn(now, options);
I did uncomment the above log_debug which is then printed only once as expected.
The problem starts with r=events->fn(now, options);. Every function called this way seems to have its log output duplicated. I checked with builtin atomics that the function is actually called only once but the log output is duplicated, e.g.:
03-12 20:45:22.627 17948 17948 D Tor : periodic_event_dispatch(): Dispatching check_descriptor
03-12 20:45:22.637 17948 17948 I Tor : routerlist_remove_old_routers(): We have 0 live routers and 0 old router descriptors.
03-12 20:45:22.637 17948 17948 I Tor : routerlist_remove_old_routers(): We have 0 live routers and 0 old router descriptors.
This is somewhat irritating when tracing the flow of events.
**Trac**:
**Username**: ansteinTor: unspecifiedMrSquancheeMrSquancheehttps://gitlab.torproject.org/legacy/trac/-/issues/21717be more data plan friendly by setting DirCache 0 when possible2020-06-13T06:08:29ZTracbe more data plan friendly by setting DirCache 0 when possibleThe default of "DirCache 1" causes all (two) consensus versions to be downloaded when the typical client use on a mobile phone only requires one version.
Either set DirCache automatically depending on the given configuration options or a...The default of "DirCache 1" causes all (two) consensus versions to be downloaded when the typical client use on a mobile phone only requires one version.
Either set DirCache automatically depending on the given configuration options or add a GUI option with a default of 0.
Note that most users of orbot will probably not thoroughly read the orbot man page, have a look at the source code and then use the custom torrc option, thus superfluous data will be downloaded which is not so nice with a mobile data plan.
**Trac**:
**Username**: ansteinNathan FreitasNathan Freitas