summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/src/log.c
AgeCommit message (Collapse)Author
2016-09-06Improve static and const correctness.iphydf
- Any non-externally-visible declarations should be `static`. - Casting away the `const` qualifier from pointers-to-const is dangerous. All but one instance of this are now correct. The one instance where we can't keep `const` is one where toxav code actually writes to a chunk of memory marked as `const`. This code also assumes 4 byte alignment of data packets. I don't know whether that is a valid assumption, but it's likely unportable, and *not* obviously correct. - Replaced empty parameter lists with `(void)` to avoid passing parameters to it. Empty parameter lists are old style declarations for unknown number and type of arguments. - Commented out (as `#if DHT_HARDENING` block) the hardening code that was never executed. - Minor style fix: don't use `default` in enum-switches unless the number of enumerators in the default case is very large. In this case, it was 2, so we want to list them both explicitly to be warned about missing one if we add one in the future. - Removed the only two function declarations from nTox.h and put them into nTox.c. They are not used outside and nTox is not a library.
2016-02-05Fix #1520: Program returns random data in a functionFerdinand Thiessen
Added default return to non void functions level_syslog and level_stdout.
2016-01-04Cleanups.irungentoo
2016-01-01Flush stdout outputMaxim Biro
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-01Fix license headers and file descriptionsMaxim Biro
2015-12-31Fix wrong filename mentioned above licenseMaxim Biro
2015-12-31Rename LOGGER_BACKEND to LOG_BACKENDMaxim Biro
2015-12-31Make daemon use the new log codeMaxim Biro
"log" is a reserved name (log from math.h), so it got changed into write_log.
2015-12-31Make logger a global object instead of an instanceMaxim Biro
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)