Commit Graph

4631 Commits

Author SHA1 Message Date
iphydf
e618829112
Add "cimple_test" to the bazel build. 2020-03-02 15:20:34 +00:00
iphydf
0f7138c010
Upgrade bazel to 2.1.1.
Removed av_test, because it depends on an ancient opencv that starts to
really not exist on modern systems anymore.
2020-03-02 14:23:44 +00:00
zugz (tox)
f6c3ce6d1f
handle message_number wraparound 2020-01-22 00:00:02 +00:00
zugz (tox)
886b9a7019
workaround for message number saving (fixes #961)
Put a future message number into the save file.

Peers require the message numbers of messages we send to increase
monotonically. If we save the current message number, then send further
messages, then quit without saving (e.g. due to a crash), and then
resume from the old save data, then monotonicity will fail. This commit
works around this problem by introducing an offset when the current
message number, so that even in the above circumstance, as long as fewer
messages than the offset were sent between saving and reloading, the
sent message numbers will increase monotonically.

The choice of offset is a balance between wanting it to be large enough
that there is room for plenty of messages to be sent in the above
scenario, and wanting to avoid the following potential problem: if we
repeatedly save and reload without sending any further messages, then
the message number may increase so far that peers will interpret an
eventual message as being old. This is not conceivably a practical issue
for the 32bit lossless message numbers, but is a concern for the 16bit
lossy message numbers.
2020-01-22 00:00:02 +00:00
zugz (tox)
e6cbe907ac
refactor 2020-01-22 00:00:00 +00:00
sudden6
683bc802e2
fix ToxAV threading documentation
ToxAV is not thread-safe at the moment, remove that claim from the
header file.
2020-01-02 11:58:52 +01:00
sudden6
1b7d7b66c5
synchronize call control actions to tox_iterate 2020-01-02 11:58:42 +01:00
sudden6
393a6be5c4
don't wait for connection when killing Tox
When tox_kill is called no other thread should be running anymore so
this locking is not needed there.
2019-12-25 14:56:43 +01:00
sudden6
6338cb46ad
fix invalid use of mutex
- Moving a pthread_mutex in memory (e.g. via realloc()) is undefined
  behavior.
- add a state for allocated but not yet used crypto connections
- change crypto_connection_status signature
2019-12-23 23:48:15 +01:00
sudden6
abfd90d25b
fix log message creating data race 2019-11-21 23:47:03 +01:00
sudden6
a29d5805a6
fix missing mutex 2019-11-21 23:47:02 +01:00
sudden6
81728addb2
fix ToxAV mutex released to early 2019-11-21 23:46:59 +01:00
crypto-universe
74fc646d45
Add VScode folder to .gitignore 2019-11-17 13:59:12 +01:00
zugz (tox)
08e6a1863e
bump libsodium version in appveyor.yml and windows Dockerfile 2019-11-17 13:40:34 +01:00
zugz (tox)
2677a53ee0
Fix miscellaneous small problems with groups:
* unset global status callback in kill_groupchats
* avoid dangling friend connections
* fix num_introducer_connections leak
* stop trying to keep connection alive on freeze
* avoid relaying lossless messages back to sender where possible
* avoid sending gratuitous online packets
2019-11-17 13:29:10 +01:00
Robin Linden
79748dd9e5
Allow Bazel to rerun tests marked as flaky 2019-11-17 01:24:02 +01:00
Robin Linden
f6235b5f8d
Update tests to use a working bootstrap node 2019-11-02 15:35:21 +01:00
Robin Lindén
1f89a57180
Fix pthread_mutex_destroy getting too many arguments 2019-09-18 23:26:13 +02:00
sudden6
ca370df651
don't update the overflow state in current_time_monotonic
This could make mono_time loose overflows on Windows.
2019-09-09 01:31:49 +02:00
sudden6
571897cecb
fix concurrency issues in mono_time
Since mono_time is accessed from the main thread as well as the toxav
thread it is needed to properly lock time updates.
2019-09-06 23:10:39 +02:00
sudden6
3d21e66a8a
fix overflow in peer nick len 2019-08-04 16:38:53 +02:00
sudden6
8ed83c3d4c
fix missing group title length check
This fixes a buffer overflow when a malformed *.tox save file is
loaded.
2019-08-04 16:38:49 +02:00
Robin Lindén
7418174129
Force IPv4 for cirrus-ci tests 2019-07-21 16:23:33 +02:00
Robin Lindén
7aab0d9952
Release 0.2.10 2019-05-30 15:36:12 +02:00
zugz (tox)
306dd1f21f
add configurable limit on number of stored frozen peers 2019-05-19 18:51:28 +02:00
Evgeny Kurnevsky
d26b11d0c2
Do not send the same packet to the same node twice. 2019-05-01 16:40:04 +02:00
sudden6
b3100c977c
add undef guard in tox_many_tcp_test
This fixes an redefinition error when creating amalgamation.cc during
static analysis
2019-05-01 14:24:46 +02:00
zugz (tox)
efff822aef
Disable failing TCP server test
The test's intermittent failure may well be exposing a real bug in the
TCP relay and/or onion systems, but we can't find the bug, and keeping
the test is disrupting our CI.
2019-04-01 19:43:32 +02:00
iphydf
a49cbe582d
Fix bazel build version at 0.22.0 for CI.
To make this reproducible. With floating versions (always latest), this
can break any time a new bazel version is released.
2019-03-24 21:59:39 +00:00
zugz (tox)
d14989f6df
put toxav.h stuff in toxav.api.h 2019-02-10 18:17:59 +01:00
zugz (tox)
695fa4373a
explain enabling in API comment 2019-02-10 00:00:00 +00:00
zugz (tox)
959f468eac
add API function to test whether av is enabled 2019-02-10 00:00:00 +00:00
zugz (tox)
49e2406ffa
Expose api functions for enabling and disabling AV in AV groups
A group loaded from a savefile starts with AV disabled.
2019-02-10 00:00:00 +00:00
zugz (tox)
0aad180d1e
Specify that buffer size for tox_conference_peer_get_name is given by $size 2019-01-21 22:17:49 +01:00
Robin Lindén
98b754e1f2
Release 0.2.9 2019-01-12 23:35:54 +01:00
zugz (tox)
a4bca35a1a
Add some const qualifiers
(Implementing suggestions of sudden6)
2019-01-12 22:38:51 +01:00
iphydf
91ff39599d
Implement all min/max functions for (un)signed int types.
Also, use them in the `onion_client` module.
2019-01-12 13:12:39 +00:00
iphydf
3dd31b1fd0
Fix misaligned 4-byte access in trace logging.
This code is undefined behaviour as is, and breaks on various platforms
requiring strict alignment (many microcontrollers).
2019-01-10 19:37:28 +00:00
zugz (tox)
86935beb2f
Avoid sending group messages to a peer before we have its group number 2019-01-07 01:11:12 +01:00
iphydf
6bc12232ac
Use (probably?) correct path to test log to cat on error. 2019-01-06 21:03:16 +00:00
zugz (tox)
e5561ad2b0
Improve handling of peers entering and leaving conferences
* send freeze packet on quit
* delete existing peers with same real_pk on adding a peer
* record actual number of conference peers saved
2019-01-06 19:37:33 +00:00
iphydf
e08f631547
Enable auto tests under STRICT_ABI if static libs are available.
STRICT_ABI only breaks linkage if static libraries are not available,
because then we try to link against shared libraries with hidden symbols.
2019-01-06 19:28:40 +00:00
iphydf
0f8b5c8255
Display build log for autotools build on failure.
We can't see the failure messages now, so something like "aborted", which
probably means assertion failure, is not very useful right now.

E.g. https://travis-ci.org/TokTok/c-toxcore/jobs/476028600#L1220
2019-01-06 17:25:14 +00:00
iphydf
765fd8a38a
Merge remote-tracking branch 'irungentoo/master' into merge-iru 2019-01-06 16:34:17 +00:00
iphydf
76b4ac4a71
Add MIN_LOGGER_LEVEL to the Circle CI builds.
This was changed a while back, and TRACE is no longer valid.
2019-01-06 16:13:31 +00:00
zugz (tox)
a122ee9e01
Expose offline conference peers in API 2019-01-05 15:01:29 +00:00
Maxim Biro
ebf3a82de8
Use new WineHQ Debian package repository key 2019-01-03 22:02:22 -05:00
zugz (tox)
1ddc922750
Define tox_conference_id_size and tox_conference_uid_size
Closes #1264
2019-01-03 14:29:20 +00:00
Evgeny Kurnevsky
e5320579a9
Fix indices calculation for congestion control. 2019-01-03 11:13:27 +00:00
zoff99
78bc9e7403
Added test and patch for VLA stack overflow vuln.
Also added and used the new crypto_malloc and crypto_free.

The latter also zeroes out the memory safely. The former only exists for
symmetry (static analysis can detect asymmetric usages).
2019-01-03 11:13:27 +00:00