At the moment this is just because qtox outputs logs in this format and
now I'm used to it, so I want to unify our log outputs to this format.
We don't really parse this output, but after this change, we could
theoretically parse the websockify log output in the qtox/debugtox log
viewer.
Allows clients to prevent leaking IP addresses through DNS lookups. This
option, together with disabling Tox UDP, entirely prevents any UDP
packets being sent by toxcore.
A continuation of the cleanup done in
b7404f24f6.
tox-bootrstrapd historically had used ints for boolean values, as it was
initially written in C89 which has no stdbool.h. Since then it has
modernized and moved on to using C11, but the usage of the int type to
represent boolean values, "boolean ints", remained. Recently, driven by
a desire to eliminate implicit int-to-bool conversion, @iphydf did a
cleanup in b7404f24f6, changing some of
the boolean ints to bools and doing manual int-to-bool conversion on the
remaining boolean ints. This left the codebase in an inconsistent state
of both ints and bools now being used to represent boolean values, not
to mention that the explicit int-to-bool conversions are a bit ugly. The
only boolean ints that remained are those stemming from libconfig's
config_lookup_bool() taking an *int parameter to return a boolean value,
as libconfig still uses C89. This commit adds a wrapper function around
libconfig's config_lookup_bool() that takes a *bool instead, eliminating
the remaining boolean ints and majority of the explicit int-to-bool
conversions in tox-bootstrapd.
Fixes security warning on websockify. It's not important, since this
program isn't used, but it's better to not have vulnerable code in a
security focussed project.
sending.
When a peer leaves a group, they send a packet to the group
indicating that they're leaving. However if this packet is sent
via TCP, it gets put in a packet queue, which is then destroyed
on the rest of the group cleanup process before ever being able
to send.
This pr allows do_gc() to finish an iteration before cleaning the
group up, which allows the TCP packet queue to be emptied. However
this bug still exists on a tox_kill() event because we don't have
a chance to do another do_gc() iteration.
We really don't support it. I tried for half an hour to get some kind of
plan9 cross compilation to work, but it's not working. If anyone wants
to bring it back, they are welcome to send a PR including a CI check for
it. Until then, these 5 lines of unused code are gone.
There will be more object arrays that need to be packed. This function
takes care of NULL (creating an empty array), and putting the correct
array size and calling the per-element callback the right amount of
times.
- We no longer assert peer roles in the mod event callback
because this causes an issue with the new events implementation,
which triggers the events after all the packets from the
current tox_iterate() are processed, rather than as the
packets are received. These checks were superfluous and shouldn't
reduce code coverage.
- A moderator now sets the topic before the founder kicks him in
order to increase internal code coverage.
These are quite expensive, because they go through all events to index
in a typed array that no longer exists. Clients should index in the
union array and find the event they want themselves, or use dispatch.