summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon
AgeCommit message (Collapse)Author
2020-05-05refactor: Remove multi-declarators entirely.iphydf
We no longer allow `int a, b;`. In the few cases where we used it, we instead better * limit the scope of the identifier (e.g. in a for-init-decl) * split the line and have 2 separate declarators, because the identifiers designate different types of things (e.g. friend numbers and group numbers).
2020-05-05refactor: Disallow multiple initialised declarators per decl.iphydf
We no longer allow: ```c int a = 0, b = 0; int a[3], b[3]; int a, *b; ``` But we do still allow (for now): ```c int a, b; ```
2020-05-05Use bash arrays instead of strings for static analysis scripts.iphydf
These are more robust wrt. spaces in names.
2020-05-04Add logging to TCP and onion client.iphydf
2020-05-03Fix a bug in savedata loading when malloc fails.iphydf
Also added a bunch of asserts to tests where they don't check allocs.
2020-05-02Add a check that we don't have any unused functions.iphydf
This check puts all of our code in a C++ anonymous namespace, which is effectively making all functions `static`. This allows the compiler to determine that a function is unused, so we can delete it.
2020-05-02Fix errors on error paths found by oomer.iphydf
* Use-after-free because we free network before dht in one case. * Various unchecked allocs in tests (not so important). * We used to not check whether ping arrays were actually allocated in DHT. * `ping_kill` and `ping_array_kill` used to crash when passing NULL. Also: * Added an assert in all public API functions to ensure tox isn't NULL. The error message you get from that is a bit nicer than "Segmentation fault" when clients (or our tests) do things wrong. * Decreased the sleep time in iterate_all_wait from 20ms to 5ms. Everything seems to still work with 5ms, and this greatly decreases the amount of time spent per test run, making oomer run much faster.
2020-05-01Release 0.2.12Robin Linden
2020-04-26Rework the toxchat/bootstrap-node Docker image.iphydf
* Use fully static build for the bootstrap daemon. * Store a sha256sum of the binary in the repo. * Updated documentation for it. * Add support for fully static build in cmake. * Enable the docker build on every PR, so we catch changes to the checksum. I realise this is adding toil, but having the checksum is valuable for security of released binaries.
2020-03-14Use spdx license identifier instead of GPL blurb.iphydf
2020-03-12Use rules_cc instead of native cc_library rules.iphydf
2020-03-03Update tox-bootstrapd's dockerfile to use Debian BusterMaxim Biro
2020-03-03Fix tox-bootstrapd's READMEMaxim Biro
2018-11-04Increase NOFILE limit for tox-bootstrapdMaxim Biro
tox-bootstrapd can use around 600 TCP sockets during TCP server's normal functioning. Many systems default to having a soft limit of 1024 open file descriptors, which we are close to reaching, so it was suggested we bump that limit to a higher number. iphy suggested increasing it to 32768.
2018-10-17Use cmake to build toxcore in tox-boostrapd's DockerfileMaxim Biro
2018-10-17tox-bootstrapd's Dockerfile shouldn't use master branchMaxim Biro
2018-10-16Make tox-bootstrapd free memory on SIGINT and SIGTERMMaxim Biro
Useful for using memory analyzing tools.
2018-10-08Remove Alpine Linux bootstrap daemon dockerfile.iphydf
We can add it back when there is a test for it. For now, we don't know whether it works and don't have tests to make sure it keeps working.
2018-09-14Standardise header guards.iphydf
Using the full path including the repo name.
2018-08-30Use our own logging facility to log toxcore's logsMaxim Biro
2018-08-30Feature bootstrap trace/debug log outputcotox
Don't know why codes with macro dosen't work. As it's only a few expensive, just code it without macro for now. \#if (MIN_LOGGER_LEVEL == LOG_TRACE) || (MIN_LOGGER_LEVEL == LOG_DEBUG) fprintf(stderr, "[%s] %s:%d(%s) %s\n", strlevel, file, line, func, message); \#endif
2018-08-26Update copyright to 2018.iphydf
2018-08-16Use per-instance `Mono_Time` for Messenger and onion.iphydf
2018-08-16Reduce the number of times `unix_time_update` is called.iphydf
Reduced by, e.g.: * `file_transfer_test`: 33% of the `clock_gettime` calls. * `tox_many_test`: 53% of the `clock_gettime` calls. Other tests will see similar improvements. Real world applications will be closer to 40-50% improvement, since tox_many_test has 100 nodes, while file_transfer_test has 2 nodes.
2018-08-12Fix a few warnings from clang.iphydf
Also remove the use of a VLA in a context where there can be unbounded memory allocations.
2018-07-22Run Clang global static analysis on Travis.iphydf
This uses a single .cc file containing almost all the code in the repository to perform whole program analysis.
2018-07-09Factor out time keeping code into its own module: mono_time.c.iphydf
It turns out, `unix_time` is also monotonic, and is used as such, so I've renamed the new functions to `mono_time_*`. 2018-07-08: ``` 00:01 <@irungentoo> the idea used to be that the unix_time() function could go backward in time but I think I might have started using it like if it could not after I changed it so that it would never go back in time ```
2018-07-05Make tox.c unambiguously parseable.iphydf
Rules: 1. Constants are uppercase names: THE_CONSTANT. 2. SUE[1] types start with an uppercase letter and have at least one lowercase letter in it: The_Type, THE_Type. 3. Function types end in "_cb": tox_friend_connection_cb. 4. Variable and function names are all lowercase: the_function. This makes it easier for humans reading the code to determine what an identifier means. I'm not convinced by the enum type name change, but I don't know a better rule. Currently, a lot of enum types are spelled like constants, which is confusing. [1] struct/union/enum
2018-07-01Simplify Travis CI builds.iphydf
Have one script per build. This means more duplication between the scripts, but it's much easier to understand and to run locally.
2018-06-25Make bootstrap daemon use toxcore's versionMaxim Biro
2018-05-22Fix bootstrap loggercotox
TODO: need a meanful log output
2018-05-20Add empty logger to DHT bootstrap daemons.iphydf
These should register a proper logging callback so the messages don't go devnull, but this at least ensures a logger is available.
2018-03-16Remove the use of the 'hh' format specifier.iphydf
It's not supported in mingw. See https://github.com/TokTok/c-toxcore/issues/786.
2018-02-09Remove libcheck from the dependencies.iphydf
We're not gaining much from this library, and it's a burden, especially for windows development.
2018-01-30Use nullptr as NULL pointer constant instead of NULL or 0.iphydf
This changes only code, no string literals or comments.
2018-01-28Avoid clashes with "build" directories on case-insensitive file systems.iphydf
2018-01-22Use self-built portaudio instead of system-provided.iphydf
2018-01-21Add BUILD files for all the little tools in the repo.iphydf
Also, fix av_test.c, since I broke it last time.
2018-01-20Remove nTox from the repo.iphydf
It's a maintenance burden nobody uses. Let's make toxic the official console client, instead.
2018-01-16Make DHT a module-private type.iphydf
2018-01-16Use apidsl to generate LAN_discovery.h.iphydf
2018-01-16Add Alpine Linux Dockerfileromik-g
2017-12-16Update tox-bootstrapd DockerfileMaxim Biro
2017-06-04Split daemon's logging backends in separate modulesMaxim Biro
2017-04-19Fix markdown formattingMaxim Biro
2017-02-26Add part of platform-independent network API implementationDiadlo
socket -> net_socket htons -> net_htons htonl -> net_htonl connect -> net_connect sendto -> net_sendto_ip4 getaddrinfo -> net_getipport sa_family_t -> Family
2017-01-28Add VLA compatibility macro for C89-ish compilers.iphydf
2017-01-19Update license headers and remove redundant file name comment.iphydf
"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-06Revert "Revert "Portability fixes""David Zero
This reverts commit 59e2a844f04a8725e8079f854158aa86ef5988b2, and defines _DARWIN_C_SOURCE in toxcore/network.c
2017-01-05Revert "Portability fixes"endoffile78
This reverts commit f3469070fe899e8e4fd88665386a55bad9f77cd8.