Commit Graph

3733 Commits

Author SHA1 Message Date
Roman Proskuryakov
7d66c70037 add: more comments into network.c 2016-01-27 02:14:59 +03:00
Roman Proskuryakov
b3655f2c60 add: comments about hairy code 2016-01-27 02:14:59 +03:00
Roman Proskuryakov
94d6333107 add: comment about endianness 2016-01-27 02:14:59 +03:00
Roman Proskuryakov
ed3a794c9b fix: compare sensitive data with sodium_memcmp
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
	fix: make crypto_core more stable agains null ptr dereference
2016-01-27 02:14:59 +03:00
irungentoo
61f8e65c01
Merge branch 'travis-fix' of https://github.com/nurupo/InsertProjectNameHere 2016-01-24 21:58:57 -05:00
irungentoo
bf7a7ef4b6
Merge branch 'nurupo-tox-bootstrapd-get-nodes-fix' 2016-01-24 21:58:33 -05:00
Maxim Biro
e4f86e2485 Update Travis script
Reduces the running time from about 8 minutes to about 5, as it uses
packaged libraries instead of building them. This is possible because
of the Ubuntu Trusty becoming available on Travis. The new check that
is in Trusty has different behaviour than the previously user version
of it -- it doesn't output the detailed result of tests. To fix this
we cat a file where this detailed result is stored.
2016-01-24 01:38:20 -05:00
Maxim Biro
c597f0786d Add missing newline 2016-01-24 01:33:53 -05:00
irungentoo
47c1e5fa43
Merge branch 'mannol-master' 2016-01-15 15:35:12 -05:00
Eniz Vukovic
bd62c6a359 Fix issue #1497 2016-01-13 23:14:51 +01:00
irungentoo
b9ef24875c
Test fix. 2016-01-04 22:59:29 -05:00
irungentoo
405854e1e7
Cleanups. 2016-01-04 22:48:58 -05:00
irungentoo
c6bed82d47
Merge branch 'tox-bootstrapd-docker-support' of https://github.com/nurupo/InsertProjectNameHere 2016-01-04 22:43:36 -05:00
irungentoo
760f20c945
DHT improvements part 1. 2016-01-04 20:14:57 -05:00
Maxim Biro
9d1efd5949 Change init.d to SysVinit 2016-01-02 18:55:53 -05:00
Maxim Biro
516d5ac09d Add information on how to update the bootstrap daemon 2016-01-02 18:46:52 -05:00
Maxim Biro
6c104b5fe3 Keep it in alphabetical order 2016-01-01 21:10:20 -05:00
Maxim Biro
f74d7c5ae6 Version bump 2016-01-01 20:29:24 -05:00
Maxim Biro
1b721ea1ec Add Dockerfile for the daemon 2016-01-01 20:29:24 -05:00
Maxim Biro
c22c06adbe Flush stdout output
Apparently when no tty is attached, which is the case for Docker, the
buffer size for stdout increases to the point that only half of the
entire log might be written.
2016-01-01 20:29:24 -05:00
Maxim Biro
5d9e40bbd3 Unify function comment style
Use doxygen java-style function comments already used in log.[c|h].
2016-01-01 20:29:24 -05:00
Maxim Biro
232488816e Fix license headers and file descriptions 2016-01-01 20:29:18 -05:00
Maxim Biro
d89fdb230b Fix include paths
They are relative to the Makefile instead of the source file itself,
which is unintuitive and is messing with my IDE.
2016-01-01 20:28:48 -05:00
Maxim Biro
da76da6c95 Remove dependency on files from testing directory
Also remove unneeded includes and refactor sleep define.
2016-01-01 00:55:09 -05:00
Maxim Biro
7d86caf51f Put command-line arguments related functions in a separate file 2016-01-01 00:36:57 -05:00
Maxim Biro
6b40a581b1 Put config-related functions in a separate file
bootstrap_node_packets.c was giving an error as it was being included
twice and there were no include guards, so part of it was split into
bootstrap_node_packets.h.
2016-01-01 00:19:35 -05:00
Maxim Biro
e1fc8c1d3c Add ability to run the daemon in foreground
Useful for things like a Docker container or just running it in the
terminal.

Complements the stdout logging option. This is actually why the stdout
logging was added in the first place -- to be used in the foreground
mode, though nothing stops one from using stdout in the background
mode, which one could redirect to a file.
2015-12-31 23:18:39 -05:00
Maxim Biro
2ef1ce9421 Fix wrong filename mentioned above license 2015-12-31 20:06:37 -05:00
Maxim Biro
ffa927fa36 Rename LOGGER_BACKEND to LOG_BACKEND 2015-12-31 20:01:24 -05:00
Maxim Biro
a40fd1bb6c Add ability to specify multiple command line arguments
Needed in order to specify which log backend to use.

Init scripts need to be updated to contain --config before the path to
the config file.
2015-12-31 19:58:34 -05:00
Maxim Biro
8c812f5341 Make daemon use the new log code
"log" is a reserved name (log from math.h), so it got changed into
write_log.
2015-12-31 02:44:44 -05:00
Maxim Biro
c50781a2b7 Make logger a global object instead of an instance
Passing Logger object into every function isn't fun. See for yourself:
something as simple as a public key printing function turns from
>void print_public_key(const uint8_t *public_key)
to
>void print_public_key(Logger *logger, const uint8_t *public_key)
2015-12-31 01:24:31 -05:00
Maxim Biro
bfc3c4eaac Add logger object to be able to support multiple logging backends 2015-12-30 23:43:04 -05:00
Maxim Biro
78d6e2d58b Change log levels
Some of them were set incorrectly, e.g. something that caused the
daemon to exit was marked as just a warning, instead of an error.

Removed debug level as it was hard to decide whether something should
go into info or debug. This is mostly because the use of the debug level
wasn't well defined. Debug should be used for information that could
help a user to debug an issue, but messages marked as debug were by the
most part the "success" log messages, which could go into info level
instead.
2015-12-30 21:49:00 -05:00
irungentoo
dedf86311b
Fixed possible bug. 2015-12-17 16:15:20 -05:00
irungentoo
07b4b041fb
Allow 0 length sendnode. 2015-12-17 14:05:35 -05:00
irungentoo
0938ba08d9
Send get nodes instead of ping to timing out nodes. 2015-12-16 17:22:07 -05:00
irungentoo
d6b4761c2f
This is still useful. 2015-12-16 16:42:12 -05:00
irungentoo
09aa7884c8
Slightly increase ping timeout. 2015-12-16 16:24:29 -05:00
irungentoo
97ba2f7640
Less packet spam. 2015-12-16 14:26:40 -05:00
irungentoo
c1e00c5d39
Improved the to_ping list. 2015-12-16 11:28:30 -05:00
irungentoo
1d91699e8e
Fixed use of it after free. 2015-12-15 15:12:38 -05:00
irungentoo
9a87f03aec
Onion test fixed to work with faster DHT. 2015-12-15 14:58:36 -05:00
irungentoo
836e180757
More efficient DHT searching. 2015-12-15 14:13:28 -05:00
irungentoo
5e6bd7bfee
Sort list if timed out nodes are in the middle of the list. 2015-12-14 20:18:53 -05:00
irungentoo
4cfafe8310
Send get nodes more to closer nodes than further nodes. 2015-12-14 19:37:19 -05:00
irungentoo
9b9d442e17
Merge branch 'LittleVulpix-donatorfile' of https://github.com/LittleVulpix/toxcore 2015-12-12 15:32:50 -05:00
irungentoo
7e56ae40fd
Small onion search improvement. 2015-12-12 14:50:25 -05:00
irungentoo
07a6f482d9
Update so this works with the new distance function. 2015-12-12 14:49:21 -05:00
LittleVulpix
7c2d4480e3 Added my pixfile! 2015-12-12 20:40:57 +01:00