Diadlo
ffcee69db9
Extract 'update_client_with_reset' function to reduce code duplication
2017-06-05 02:02:33 +03:00
Diadlo
0eaa44650f
Extract 'update_client' function
...
To make 'client_or_ip_port_in_list' code easy to read
2017-06-05 02:02:31 +03:00
Diadlo
71260e38e8
Extract variables
2017-06-05 01:51:12 +03:00
Diadlo
69c71ddd23
Change return type to be the same as return value type
...
Return value of 'addto_list' function is 'used' counter, which is uint32_t.
It will be better to use the same return type.
2017-06-05 01:51:12 +03:00
Diadlo
6197494d6b
Add using macros to improve code
2017-06-05 01:51:12 +03:00
Diadlo
db7b422f0c
Add 'index_of' functions
...
- Replace 'for' with long body
- Replace friend_number function on index_of_friend_pk
- Replace client_in_nodelist on index_of_node_pk
2017-06-05 01:51:12 +03:00
Diadlo
b3174bb6c4
Extract SharedKey struct and use it as var instead of indexing
2017-06-05 01:51:11 +03:00
Diadlo
c12ef22138
Add using C99 'for' syntax
2017-06-05 01:09:39 +03:00
iphydf
1e8fa85aad
Add a monolith_test that includes all toxcore sources.
...
This requires that every symbol, even if static (file-scope), is unique.
The idea is that we can easily run "whole" program static analysis on
programs that include monolith.h ("whole" is in quotes, as we don't
include dependencies like libsodium in this static analysis).
2017-06-04 17:48:23 +00:00
zugz
2474f43087
check if already in close list in ping_node_from_getnodes_ok()
...
fix index bounds check in add_to_close() and is_pk_in_close_list()
add TODO to write test for bug which fixed by this commit
2017-04-29 18:28:28 +02:00
Robin Lindén
f6db9333e2
Release v0.1.8
2017-04-27 20:20:19 +02:00
Maxim Biro
c25e3d2d7c
Revert "initial version of tox_loop"
...
This reverts commit 200ee1cace .
2017-04-22 15:31:25 -04:00
Maxim Biro
c7f63737eb
Revert "Implement tox_loop"
...
This reverts commit 5ff099763b .
2017-04-22 15:31:25 -04:00
Maxim Biro
5ed37e5438
Revert "Fix TokTok/c-toxcore#535"
...
This reverts commit 439f676d45 .
2017-04-22 15:31:25 -04:00
Ansa89
439f676d45
Fix TokTok/c-toxcore#535
2017-04-16 10:49:56 +02:00
Diadlo
6c9b95750c
Add TCP_INET family to ip comparator
2017-04-13 20:25:19 +00:00
Yuri
f751fcfbf6
Added missing includes: <netinet/in.h> and <sys/socket.h>
...
Found these missing includes while compiling on FreeBSD 11.
2017-04-12 21:35:14 +00:00
Ansa89
5ff099763b
Implement tox_loop
2017-04-01 17:47:34 +02:00
michael bishop
200ee1cace
initial version of tox_loop
2017-04-01 17:47:34 +02:00
iphydf
aa2310ad2a
Add TOX_NOSPAM_SIZE to the public API.
...
Fixes #456 .
2017-03-30 19:36:43 +00:00
Robin Lindén
48c86e942d
Release v0.1.7
2017-03-26 15:42:48 +02:00
Diadlo
3adc2b8f5b
Add crypto_memzero for temp buffer
2017-03-26 13:12:34 +00:00
Diadlo
c07c61c5ef
Fix list malloc(0) bug
2017-03-26 12:51:30 +00:00
Diadlo
f675474c08
Fix network malloc(0) bug
2017-03-26 12:40:52 +00:00
Maxim Biro
10deb2ab5f
Fix Travis always succeeding despite tests failing
2017-03-12 08:34:53 -04:00
Diadlo
c1e3358dcd
Fix formatting with astyle
...
Fix #494
2017-03-04 15:32:00 +03:00
Diadlo
f91af5c93a
Move 'family' copying after all address checks
...
Fix #495
2017-03-04 15:32:00 +03:00
LittleVulpix
d4ca2941c5
Remove empty line
...
Found by chance by Nurupo when browsing the file
2017-02-27 22:14:30 +01:00
Diadlo
1387c8f150
Remove network dependency from toxcrypto
2017-02-26 23:19:24 +03:00
Diadlo
b19a9e5464
Add part of platform-independent network API implementation
...
socket -> net_socket
htons -> net_htons
htonl -> net_htonl
connect -> net_connect
sendto -> net_sendto_ip4
getaddrinfo -> net_getipport
sa_family_t -> Family
2017-02-26 23:16:16 +03:00
Maxim Biro
b2d04eae9d
Use VLA macro
2017-02-21 15:54:53 -05:00
zugz
bbb979d6ef
remove statics used in onion comparison functions
2017-02-11 15:27:48 +01:00
iphydf
6ae33c16cf
Add VLA compatibility macro for C89-ish compilers.
2017-01-28 20:49:12 +00:00
iphydf
895de7ef26
Release v0.1.6.
2017-01-26 23:31:27 +00:00
Yuri
2f62fa38fc
Replace redundant packet type check in handler with assert.
2017-01-26 22:29:25 +00:00
Diadlo
f00006cf1d
Add platform-independent Socket and IP implementation
2017-01-26 23:11:15 +03:00
Zoff
287a29b826
Add Android build to CI.
...
Fixes #340
Fixes #457
2017-01-24 11:47:16 +00:00
iphydf
ce0bf232d1
Add appveyor build for native windows tests.
...
It doesn't compile, yet. A few changes (like VLA support) need to be made
before we can enable appveyor as a required PR check.
2017-01-22 11:56:02 +00:00
zugz
b630121f2f
reduce thread-unsafe use of static variables
...
- rework ip_ntoa() to avoid use of static variables
- rework sort_client_list() to avoid use of static variables
- move static 'lastdump' into Messenger struct
- rework ID2String() to avoid use of static variables; rename to id_to_string()
- fetch_broadcast_info(): attempt to mitigate risks from concurrent execution
- current_time_monotonic(): attempt to mitigate risks from concurrent execution
- comment on non-thread-safety of unix_time_update
2017-01-21 22:08:52 +01:00
iphydf
995578f103
Release v0.1.5.
2017-01-19 18:26:48 +00:00
iphydf
8f96ca6d86
Update license headers and remove redundant file name comment.
...
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
2017-01-19 00:01:44 +00:00
Sergey 'Jin' Bostandzhyan
3f24f04876
Setup autotools to read .so version info from a separate file
...
We want to use the same libtool style .so versions in both build systems,
ideally both systems should read the version information from the same
configuration file.
This commit introduces an so.version configuration file and sets up
the autotools to use it.
The version numbers in so.version define the ABI compatibility and should be
updated prior to each release.
implements #323
2017-01-18 11:20:07 +01:00
iphydf
27a97a8280
Release v0.1.4.
2017-01-12 15:48:39 +00:00
iphydf
8b4eae4038
Remove TOX_DEBUG and have asserts always enabled.
...
These are cheap asserts. I've also replaced the fprintf's with
`LOGGER_ERROR` calls.
2017-01-11 19:43:08 +00:00
iphydf
583d71680e
Check that TCP connections aren't dropped in callbacks.
...
They aren't, but it's unclear whether it's structurally impossible.
2017-01-11 17:25:39 +00:00
iphydf
958aa43bdf
Fix logging condition for IPv6 client timestamp updates.
2017-01-11 15:10:52 +00:00
iphydf
2ba967d078
Always kill invalid file transfers when receiving file controls.
...
Previously, toxcore would send a kill control to the friend only if the
file control was valid. Determining which file transfer is used does not
depend on the specific file control. We can always kill it in that case.
Also, added some logging for file control logic, since there is no other
feedback on error (failure of the file control handler is swallowed).
2017-01-10 16:26:44 +00:00
iphydf
5c248e9d11
Minor simplification in file_seek code.
...
Details in comments.
2017-01-10 12:34:29 +00:00
iphydf
d6d14b5430
Remove \ at end of list in makefile.
2017-01-07 11:47:30 -06:00
endoffile78
e667ec23b9
Replace make_quick_sort with qsort
2017-01-07 11:47:30 -06:00